danubius
June 29th, 2007, 07:38 PM
hi everyone!
i just converted from os-x to ubuntu, learned hundreds of new things -- mounting usb-cameras, apple-hfs-cds and how to use my powerbook as alarm clock and lots more -- but finally failed with my first bash script. it already deleted fifty original images, and i don't want it to happen again. could please someone correct it?
#!/bin/bash
i=2165;
for file in PICT*.JPG; do
j=$(printf "%05d" $i)
mv $file D$j.JPG
i=[$i+1]
done
i want it to run inside my picture folder to rename all of them, starting with i.
thanks a lot,
danubius
i just converted from os-x to ubuntu, learned hundreds of new things -- mounting usb-cameras, apple-hfs-cds and how to use my powerbook as alarm clock and lots more -- but finally failed with my first bash script. it already deleted fifty original images, and i don't want it to happen again. could please someone correct it?
#!/bin/bash
i=2165;
for file in PICT*.JPG; do
j=$(printf "%05d" $i)
mv $file D$j.JPG
i=[$i+1]
done
i want it to run inside my picture folder to rename all of them, starting with i.
thanks a lot,
danubius