Please sign in to comment.
zmv + mmv for crazy easy renaming
Usage: zmv [OPTIONS] oldpattern newpattern where oldpattern contains parenthesis surrounding patterns which will be replaced in turn by $1, $2, ... in newpattern. For example, zmv '(*).lis' '$1.txt' renames 'foo.lis' to 'foo.txt', 'my.old.stuff.lis' to 'my.old.stuff.txt', and so on. Something simpler (for basic commands) is the -W option: zmv -W '*.lis' '*.txt' This does the same thing as the first command, but with automatic conversion of the wildcards into the appropriate syntax. If you combine this with noglob, you don't even need to quote the arguments. For example, alias mmv='noglob zmv -W' mmv *.c.orig orig/*.c
- Loading branch information...