#!/bin/csh -f # These next two definitions need to be configured for each user! set datDir = /tmp/autoSend set binDir = /usr/local/bin # OK, all standard stuff now... echo "" echo "AutoSend run started `date`" set dateID = `date | awk '{printf "%s%s\n",$2,$3}'` cd $datDir if ( -f autoSend.dat ) then # FORMAT OF DATA FILE: # FULL| # ...or... # *LIST* echo "#\!/bin/csh -f" > mkList.sh echo "set nextAuto = $datDir/autoSend.next" >> mkList.sh awk -f $binDir/mkList.awk autoSend.dat >> mkList.sh chmod +x mkList.sh mkList.sh > realList.dat cp realList.dat dataBack.${dateID} # FORMAT OF PROCESSED DATA FILE: # FULL| echo "#\!/bin/csh -f" > doList.sh awk -f $binDir/doList.awk realList.dat >> doList.sh chmod +x doList.sh doList.sh rm mkList.sh doList.sh autoSend.dat realList.dat if ( -f autoSend.next ) mv autoSend.next autoSend.dat else echo "Nothing to send - makes MY job easy\!\!" endif echo "AutoSend run completed `date`"