# 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=""#Find all gifsfind $FINDHERE -iname '*.gif' -print0 | xargs -0 file > /tmp/foo#Make a reportfor i in `awk -F: '{print $1}' /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