Delete files with regular expression
Problem
I Tried to delete files that starts with A and ends with 2 numbers but It doesn't do a thing. What I tried: Where am I wrong?
Error Output
rm ^A*[0..9]2$
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: Delete files with regular expression
You can use the following command to delete all files matching your criteria: How it works: lists all files (one by line since the result is piped). filters the list of files and leaves only those that match the regular expression indicates any number of occurrences of , where is a wildcard matching any character. indicates exactly two occurrences of , that is, any digit. executes once for every that is piped to it. Where am I wrong? For starters, doesn't accept a regular expression as an argum…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix