#!/bin/bash
for i in $1 
do
	djpeg $i | cjpeg -optimize -outfile $i~
	mv $i~ $i
	echo $i
done;
