How to rename a group of files
tl_0014_0010_20151212_133443.jpg
tl_0014_0010_20151212_133543.jpg
tl_0014_0010_20151212_133643.jpg
...
to
photo00000.jpg
photo00001.jpg
photo00002.jpg
...
?
To get you started:
i=0
for file in tl*.jpg
do
printf -v counter "%05d" $i
mv $file photo$counter.jpg
i=$((i+1))
done
The printf command ensures the counter has leading zeroes.
Note that I didn't test this.
-v
option toprintf
is a shell extension that's not supported in most Bourne shells. A more portable method iscounter=$(printf "%05d" "$i")
. – RobertL Dec 12 '15 at 14:07