[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: regexp for rename command - please help!



Vadkan Jozsef wrote:
> The filename, that i want to rename:
> 
> ---vol.-01-disk-cantatas-bwv-3;
> 
> commands, that doesn't work:
> 
> $ rename 's/^---//g' *
> Unknown option: -vol.-01-disk-cantatas-bwv-3;
> Usage: rename [-v] [-n] [-f] perlexpr [filenames]

Use:
rename 's/^---//g' -- *

The -- is commonly used to let programs know that whatever follows should not be
interpreted as an option (which is necessary because your file name begins with --)

- Chris Burkhardt


Reply to: