#! /bin/csh -f # Last edited on 2003-03-19 21:55:50 by stolfi set usage = "$0" # Saves copies of the original files turned in by students, with # names XXX-orig.{pov,gif,inc}. # Used prior to rebuilding them. # Reads files # rausrs.txt : RA numbers and login names of all registered students if ( $#argv != 0 ) then echo "usage: ${usage}"; exit 1 endif set rafile = "rausrs.txt" set ras = ( `cat ${rafile} | egrep -v '^ *([#]|$)' | gawk '//{print $1;}'` ) foreach ra ( ${ras} ) foreach f ( ` ls [0-9]*/*.{pov,inc,gif} | egrep -v 'absent|missing|[-]orig[.]'` ) cp -pvi $f ${f:r}-orig.${f:e} end end