On Mon, Jul 30, 2001 at 05:40:06PM -0300, Miguel Griffa wrote: > At 01:30 p.m. 30/07/01 -0700, Aaron Brashears wrote: > >The command I would expect to work: > > > >convert -sample 50% * > > > >only converts the last file in the directory, and converts it twice > >(!) to a filename with '.0' and '.0.0' appended. Any way I can use > >convert in some kind of batch mode? > > I don't know about convert but if this works > convert -samle 50% original.ext new_file.ext > you can easilyu do that with bash > for i in `ls *`; do convert -sample 50% $i `echo $i |sed -e"s/.*/new_&/"`; > done ^^^^^^ ^^^^^^^^^^^^^^^^^^^
Why would you ever do either of these? for i in *; do convert -sample 50% "$i" "new_$i"; done Cheers, -- Colin Watson [EMAIL PROTECTED]