P
pc
hi all,
In shell I can select the second column of ps with awk: ps -ef | |
grep [some process I am looking for] | awk '{print $2}'
when running a perl script and redirecting the output of ps to a file,
eg
open(F, "ps -ef | grep [some process I am looking for] | awk '{print
$2}' | "); the ' inverted comma upsets the redirection.
Help! How can I select the second (PID) column of ps in perl?
TIA
eddiec
In shell I can select the second column of ps with awk: ps -ef | |
grep [some process I am looking for] | awk '{print $2}'
when running a perl script and redirecting the output of ps to a file,
eg
open(F, "ps -ef | grep [some process I am looking for] | awk '{print
$2}' | "); the ' inverted comma upsets the redirection.
Help! How can I select the second (PID) column of ps in perl?
TIA
eddiec