I would like to issue a kill command across many *nix machines. I'm attempting to do something like this:
rsh <remotemachine> ps -ef | grep <somepattern> | awk '{print $2}' | xargs n1 -t -i kill {}
But that issues the kill command on the local machine, not the remote machine. I've also tried something like this:
rsh <remotemachine> kill $(ps -ef | grep <somepattern> | awk '{print $2}')
But that's not working for me either.