#!/bin/bash # # acheck.sh - attendance processing check. Generate e-mailable output prior # to actual processing of attendance data to correct any gotchas. # semester="`/usr/local/bin/semester.sh`" cd /usr/local/etc/attendance/${semester}/processing for class in `/bin/ls -1 | cut -d'.' -f2 | sort | uniq`; do echo "$class" echo "------------------------------------------------------------" for entry in `grep . *.$class.* | sed -e "s/ /_/g" -e "s/\.$class\.class//"`; do user="`echo $entry | cut -d':' -f1`" point="`echo $entry | cut -d':' -f2`" msg="`echo $entry | cut -d':' -f3-9 | sed -e 's/_/ /g'`" printf "%-8s\t%s\t" $user $point echo $msg done echo done | mail -s '[Attendance] Processing Status Update' wedge@lair.lan exit