If you want to loop through something with more than one variable in bash this is your ticket to ride:
#!/usr/bin/env bash while read -r x y z; do echo "$x $y $z" done <<'_____HERE a b c 1 2 3 x y z 7 8 9 _____HERE
If you want to loop through something with more than one variable in bash this is your ticket to ride:
#!/usr/bin/env bash while read -r x y z; do echo "$x $y $z" done <<'_____HERE a b c 1 2 3 x y z 7 8 9 _____HERE
put the list of files into a file
ls -1 foo*.jpg > /var/tmp/jpglist
rename randomly named files in numerical order
cat /var/tmp/jpglist|perl -e'$i=1;while ($name=) { chomp $name;$new="week" . $i . ".jpg";system ("cp $name $new");;$i++};'
resize all 13 files named week[number].jpg, add the Week[number].jpg to the lower right hand corner of the file
for file in {1..13} ;do convert -adaptive-resize 256x -gravity SouthEast -pointsize 30 -annotate 0 "Week $file" week$file.jpg week${file}_sm.jpg; done
stack the jpgs into a animated gif, center the extra vertical space (not all the images are the same height, the tallest image is about 350 pixels).
convert -delay 200 -loop 0 -gravity center -extent 256x350 -coalesce -trim -layers TrimBounds -dispose 2 week[1-9]_sm.jpg week1[0-9]_sm.jpg animated.gif