moked has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl STAGE1: while (1) { $l=system "pslist|grep process_name>!temp"; if ($l=="256") { sleep(1); } else { sleep(1); goto STAGE2; } } STAGE2: while (1) { $l=system "pslist|grep process_name"; # print "$l \n"; if ($l=~"256") { sleep(1); #Code 4 execution here unlink "!temp"; goto STAGE1; } else { sleep(1); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Starting a script according to processes
by Zaxo (Archbishop) on Jan 10, 2005 at 13:33 UTC | |
|
Re: Starting a script according to processes
by zentara (Cardinal) on Jan 10, 2005 at 13:36 UTC | |
|
Re: Starting a script according to processes
by ZlR (Chaplain) on Jan 10, 2005 at 16:05 UTC | |
|
Re: Starting a script according to processes
by ikegami (Patriarch) on May 31, 2009 at 07:42 UTC | |
|
Re: Starting a script according to processes
by Grygonos (Chaplain) on Jan 10, 2005 at 14:08 UTC | |
by dave_the_m (Monsignor) on Jan 10, 2005 at 14:29 UTC |