# Alter FINDHERE to where you want this thing to searchFINDHERE="/home/pi/public_html/"# Identify will give multiple lines for animated gif.function is_animated_gif() { FRAMES=$(identify $1 | wc -l) [ $FRAMES -eq 1 ] && return 1 [ $FRAMES -ge 1 ] && return 0}#Clean uprm animated_gif_report.txt non_animated_report.txt### Save the field separators. The files I generate are newline sep'dold_IFS=$IFSIFS=""#Make a report of all the found .gifsfor i in `find $FINDHERE -iname '*.gif' /tmp/foo` ; do if is_animated_gif $i ; then echo $i >> animated_gif_report.txt else echo $i >> non_animated_report.txt fidonefor GIFFILE in `cat non_animated_report.txt` ; do PNGFILE=`echo $GIFFILE | sed 's/\.gif/.png/i'` echo convert $GIFFILE $PNGFILE # for debugging # convert $GIFFILE $PNGFILE # Uncomment if you're certain.done#fix the field separatorIFS=$old_IFS