Rhodium has asked for the wisdom of the Perl Monks concerning the following question:
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?#!/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
The <it>seeker</it> of perl wisdom.
Replies are listed 'Best First'. | |
---|---|
Re: Append a tools status to the command line..
by Kanji (Parson) on Apr 14, 2002 at 16:43 UTC | |
Re: Append a tools status to the command line..
by lhoward (Vicar) on Apr 14, 2002 at 21:20 UTC | |
Re: Append a tools status to the command line..
by stephen (Priest) on Apr 15, 2002 at 02:37 UTC | |
Re: Append a tools status to the command line..
by kappa (Chaplain) on Apr 16, 2002 at 14:47 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |