views:

22

answers:

1

mv command doesnt accept pattern matching like grep !
Whats the good way to handle this and similar kind of operations ?

+2  A: 

There's the rename tool, but if that's not what you want, you can do:

for file in *; do
    new_file="${file##[0-9]}" # Strip all leading numbers
    mv "$file" "$newfile"
done
Daenyth