A
alex922
Hi, I've been trying to get used to using perl one-liners. So far so
good, except, I can't seem to use perl one-liners to search and kill
processes remotely. For example, lets say I run the 'top' command on
Machine A.
I then run the command to seach and try to kill the process.
ssh user@host ps -fe | grep top | perl -ne 'split /\s+/; kill -9 $_[1]'
however, I get the message,
kill: 26475: No such process
but when I login to the remote machine, it does indeed have that
process.
Any help would be great!
Thanks!
Alex
good, except, I can't seem to use perl one-liners to search and kill
processes remotely. For example, lets say I run the 'top' command on
Machine A.
I then run the command to seach and try to kill the process.
ssh user@host ps -fe | grep top | perl -ne 'split /\s+/; kill -9 $_[1]'
however, I get the message,
kill: 26475: No such process
but when I login to the remote machine, it does indeed have that
process.
Any help would be great!
Thanks!
Alex