in reply to array newbie...(sigh)
Would this be better for you?
Each call to ps is exactly the same except who you are grepping for, so you only need to store what is different in your array.my @occupation = qw(netman jobman mailman batchman writer); foreach my $pation (@occupation) { `ps -ef|grep -i $pation|grep -v grep|wc -l`; }
Also, there may be a CPAN module for interacting with ps...
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: array newbie...(sigh)
by PrakashK (Pilgrim) on Mar 15, 2002 at 20:03 UTC | |
|
Re: (jeffa) Re: array newbie...(sigh)
by ddrumguy (Acolyte) on Mar 15, 2002 at 19:40 UTC | |
by jeffa (Bishop) on Mar 15, 2002 at 22:25 UTC |