D
dn_perl
From command line, the following command gives IDs of all the
processes.
ps -ef | awk -F" " '{print $2}'
But if I use the command in a perl script within backticks, I get full
listing in the array instead of just the process IDs.
my @list_of_procs ;
@list_of_procs = ` ps -ef | awk -F" " '{print $2}' ` ;
Why is this so and how do I create an array with just the process IDs?
Thanks in advance.
processes.
ps -ef | awk -F" " '{print $2}'
But if I use the command in a perl script within backticks, I get full
listing in the array instead of just the process IDs.
my @list_of_procs ;
@list_of_procs = ` ps -ef | awk -F" " '{print $2}' ` ;
Why is this so and how do I create an array with just the process IDs?
Thanks in advance.