Rhodium has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I have a neat little perl wrapper for a tool that we use all the time. It basically checks syntax, and does some verification before this tool lauches. When this tool launches we can run this other little command line csh script which will tell you it's status. Here is the little csh code
#!/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
Now obviously I can do this in perl. But I was thinking hey woulnd't this be cool to just append it's progress to your prompt line.. So you always know where it's at? So does anyone know how to set the prompt (depending on there shell) to monitor somthing like this? Any Ideas?
Thanks so much!!


The <it>seeker</it> of perl wisdom.