#!/bin/bash #file number to start with COUNT=1 # total number of original files OTOTAL=99 # angle of the pictures in the first file ANGLE=0 # 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 #append the jpgs counting from 001-099 into 2x2 square jpeg with the numbers 001-099 #resize the file. rotate them by the current angle montage \( montage/container/$VAR.jpg -rotate $ANGLE \) \( montage/altona/$VAR.jpg -rotate $ANGLE \) \( montage/hans/$VAR.jpg -rotate $ANGLE \) \( montage/platte/$VAR.jpg -rotate $ANGLE \) -tile 2x2 -geometry 360x288!+1+1 montage_$VAR.jpg #add 1 to the number of the last runthrough let COUNT=COUNT+1 #calculate the angle for the current runthrough. current angle + 3.65. For 99 files this will complete a 360 ANGLE=$(echo "scale=2; $ANGLE + 3.64" | bc) done