Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my % commands = ( CMD1 => process 1, CMD2 => process 2, CMD3 => process 3, ); foreach my $cmd(keys %commands) { `$commands{$cmd}`; if($?) { print ¨ Error: $commands{$cmd}\n¨; } }
Now my question is, in above execution is there any way to print below statement after every one minute of one of the process took more than a minute,
print ¨Still executing: $command{$cmd}\n¨;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: execute command as well as prompt user
by BrowserUk (Patriarch) on Aug 31, 2010 at 11:18 UTC | |
|
Re: execute command as well as prompt user
by dasgar (Priest) on Aug 31, 2010 at 15:12 UTC |