polka4ever
Technical User
hello,
does perl allow/understand when i use AWK inside of a system command? I can't understand why this isn't working:
$pid=`ps -ef | grep java | egrep -v grep | awk '{print $2}'`;
print "$pid";
when i type: ps -ef | grep java | egrep -v grep | awk '{print $2}'
at the command prompt itself - i get ONLY the process ID.
But in perl - this returns the whole shebang - like the owner, process id, parent process id, etc, etc ...
I JUST want the process id (so i can kill it, in the next command).
~p0lka
does perl allow/understand when i use AWK inside of a system command? I can't understand why this isn't working:
$pid=`ps -ef | grep java | egrep -v grep | awk '{print $2}'`;
print "$pid";
when i type: ps -ef | grep java | egrep -v grep | awk '{print $2}'
at the command prompt itself - i get ONLY the process ID.
But in perl - this returns the whole shebang - like the owner, process id, parent process id, etc, etc ...
I JUST want the process id (so i can kill it, in the next command).
~p0lka