I am working on a script which basically run system command to achieve some goal and in whole process I am suppose to run more than 25 command one by one in respective order at a time,
So rather than having noisy output on the screen
1. I am planning to redirect all the output system generated output to log file,
2. After every successful execution of command I am planning to write in the log file “respective command is success”<br>
3. If the execution fail write to log file.
And I have done following while I am in testing phase,
`(echo $command; $command )>> "$log" 2>&1`;
to capture system generated output.
open(LOG, ">>$log")|| die “Can’t open log file$!\n”; print LOG <<HEADING; ================================================================== HEADING print LOG "\n[Command Successful..\t]\n"; print LOG "CMD: $command\n"; print LOG "DES: $description\n"; print LOG scalar localtime(); print LOG "\n"; close LOG; }
As I am going this for first time and I don’t have much experience, I am looking forward for suggestion!!!!
Please
Cheers
This post has been edited by girasquid: 28 July 2009 - 07:24 AM

New Topic/Question
Reply




MultiQuote


|