Re: mv * small_*
Walt Sullivan <[email protected]>
| Newsgroups | gmane.user-groups.linux.ottawa.general |
|---|---|
| Message-ID | <[email protected]> |
I'd use "rename", which applies a perl regexp to a list of filenames $ rename Usage: rename [-v] [-n] [-f] perlexpr [filenames] $ rename 's/^/small_/' *.foo Can't rename *.foo small_*.foo: No such file or directory $ Then, to apply imagemagick [options] to each file, you must handle the files one at a time, and produce an output filename. $ for i in small_*.foo ; do > out="new_$i" > convert $i [options] $out > done and the output files are "new_small_<original filename>.foo" On Fri, 2010-05-28 at 15:56 -0400, James wrote: > I want to prepend 'small_' to a bunch of files and then resize them > with image magic. > Does anyone know how to do regex with mv? -- OCLUG general discussion list [email protected] http://oclug.on.ca/mailman/listinfo/oclug