3 # This script prints the letters confirming registration for the extra
6 # The algorithm consists of first checking to see that the previous
7 # day's job printed. If so, the cached copy is deleted. Otherwise,
8 # today's is appended to yesterday's and we continue working with that.
10 PATH=/bin:/bin/athena:/usr/ucb:/usr/bin/athena:/usr/athena; export PATH
12 newfile=/tmp/letter.out
13 savefile=/u1/letter.save
15 # These are not normally local, so may need to point somewhere else
20 last=`$lpquota -l | tail -2`
21 if [ "`echo $last | $colrm 1 4 | $colrm 7`" = \
22 "`ls -l $savefile | $colrm 1 32 | $colrm 7`" ]; then
25 if [ -s $savefile ]; then
26 cat $newfile >> $savefile
27 echo "Reg_extra letter printing error" | /bin/mail dbadmin
33 $lpr -P$printer -h $savefile