Here is the final script
I start with
mm_aa_xx_yy.jpg at 2720dpi
and I get
aa_mm_xx_yy.jpeg still 2720dpi
and
aa_mm_xx_yy_petit.jpeg with 720x480 resolution
~~~~~~~~~~~~
#!/bin/bash
for i in *jpg
do
#rename files by changing extension from jpg to jpeg
cp --preserve "$i" `basename $i jpg`jpeg;
# remove old file
rm "$i" ;
done
for j in *jpeg
do
#invert month and year
new=$(echo $j|sed -e \
's#^\(.\)\(.\)\(.\)\(.\)\(.\)\(.*\)#\4\5\3\1\2\6#');
mv $j $new;
#creates thumnails
convert -size 720x480 "$new" -geometry 720x480 `basename $new
.jpeg`_petit.jpeg;
done
~~~~~~~~~~~~
thanks all for your help
Philippe
Philip S Tellis wrote:
> On Thu, 22 Aug 2002, Binand Raj S. wrote:
>
>
>>> NEW=`echo $i | sed -e 's/^\(.\)\(.\)\(.\)\(.\)\(.\)\(.*\)/\4\5\3\1\2\5/'`
>>
>>Note that it should end with ...\2\6/'` and not as Philip posted. :-)
>
>
> did I mention backslashitis? hmm... add to that typing outside the
> margin.
>
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help