rm command and regular expressions via Linux BASH shell

Posted by PeanutsMonkey on Super User See other posts from Super User or by PeanutsMonkey
Published on 2012-09-09T07:51:05Z Indexed on 2012/09/09 9:40 UTC
Read the original article Hit count: 334

Filed under:
|

I am attempting to use regular expressions to remove set of files however the bash shell returns the message

rm: cannot remove `[0-99]+ -': No such file or directory
rm: cannot remove `[a-zA-Z': No such file or directory
rm: cannot remove `]+.[a-z]+': No such file or directory

The command is [0-99]+\ - [a-zA-Z ]+\.[a-z]+

Questions

  1. Can I use regular expressions?
  2. If yes, how do I use them with commands such as rm, mkdir, etc

© Super User or respective owner

Related posts about linux

Related posts about regex