You could do something similar to your Amiga examples with bash parameter substitution (although a loop is needed, afaik)
Code:
$ for file in *.mp3; do mv -v -- "$file" "${file#[0-9][0-9] - }"; done
`01 - Season of the Witch.mp3' -> `Season of the Witch.mp3'
(strips the leading 2-digits-plus-space-hyphen-space from any mp3 files that have it - mv will skip any that don't match)
The perl syntax in the rename command is not too bad
Code:
$ rename -v -- 's/^\d+\s-\s//' *.mp3
01 - Season of the Witch.mp3 renamed as Season of the Witch.mp3
1999 - The Music of Canada.mp3 renamed as The Music of Canada.mp3
(match 1 or more digits followed by whitespace-hyphen-whitespace at the start of the name, and replace it with nothing), and rename supports older non-perl specific regex syntax if you're more comfortable with that e.g.
Code:
rename -v -- 's/^.....//' *.mp3 # match and replace (cut) five leading characters
rename -v -- 's/^.{5}//' *.mp3 # match and replace (cut)five leading characters (alternative)
rename -v -- 's/^[0-9]+ - //' *.mp3 # uses older style [0-9] instead of Perl \d and literal space instead of more general \s
Bookmarks