#!/bin/csh set logfile = `/bin/ls -c1tr *.log | tail -1` set total = `cat jxrun.stg | awk ' {print $4} '` set stage = `grep STAGE $logfile | tail -1 | awk ' {print $4} '` echo "" echo "Total number of Stages .... $total" echo "Job currently at Stage .... $stage" echo "scale=2" > .bcinput echo "$stage/$total*100" >> .bcinput echo "quit" >> .bcinput echo "" echo "Your Dracula Job is" `bc .bcinput` "percent Complete." echo "" if ( `bc .bcinput` == 100.00 ) then echo "The following line should say THE END OF PROGRAM" echo "" tail -2 $logfile echo "If not, your job is still on the last stage." echo "" endif