Originally Posted by control_guy
Okay there is an improvement:
for i in `ls *.jpg`; do convert -resize 800x600 -quality 90 $i resized_$i; tar -rvf pics.tar conv_$i; done
But I still do not want the files to be created, and would rather forward the stream directly to tar. Any help??
You don't need to use ls in the for loop:
for i in *.jpg; do
convert -resize 800x600 -quality 90 $i - | tar -rvf pics.tar;
The - in the convert command sends the output to standard output, and then it's piped into tar, whereupon tar reads in standard input instead of a bunch of file names.
edit: I'm a dunce. This doesn't work, but I don't know why. However, the part about not needing ls is true