#!/bin/bash # Creates a parameter file for the ppmtompeg conversion program, and then # runs the ppmtompeg program. This code comes from a script written by # Jason Harrison, November 13, 2001, of the University of British # Colombia. I recoded it in bash and changed the interface a little. # Scott D. Anderson # December 2002 if [ $# -ne 1 ]; then echo "usage: $0 basename" echo "Takes a collection of files starting with basename001.ppm" echo "Creates a parameter file called basename-of-frames.pf" echo "then makes an mpeg named basename.mpg" exit 0 fi base=$1 if [ ! -e "${base}001.ppm" ]; then echo "I need the first frame to be ${base}001.ppm" exit 1 fi first=001 for file in ${base}*.ppm; do echo $file > /dev/null done last=`echo $file | sed s/$base// | sed "s/\.ppm//"` #echo "last = $last" cat > $base.pf <