#!/bin/bash #make new directory where deinterlaced files are placed mkdir deinterlaced #file number to start with COUNT=1 # total number of original files OTOTAL=99 # loop to call up the files to process. calls up files numbered from 000-999 in accending order while [ $COUNT -le $OTOTAL ]; do if [ $COUNT -le $OTOTAL ]; then VAR=`printf "%03d" $COUNT` fi #cut image vertically in half and then double vertically, change to jpg if necessary convert $VAR.png -sample 100%x50% -resize 100%x200% deinterlaced/$VAR.png echo $VAR #add 1 to the number of the last runthrough let COUNT=COUNT+1 done