#!/bin/bash # Script to create a movie from files if [ "$#" == "0" ]; then exit 0 fi i=1 plot=/home/sam/Documents/University/honours/research/TCS/plot.sh process=/home/sam/Documents/University/honours/research/TCS/process.py process2= #process="" # Do nothing mkdir -p images for arg in $@; do echo "Plotting $arg" if [ "$process" != "" ]; then echo "Process: $process $arg $process2 > $arg.p" $process $arg $process2 > $arg.p $plot $arg.p images/$i.png $1.p else $plot $arg images/$i.png $1 fi i=$(( $i + 1 )) done cd images ffmpeg -r 10 -b 1024k -i %d.png movie.mp4 rm -f *dat.p