Looking to use kill -9
instead of killall
using process name.
Is there a way I can grep
or awk
the pid of a given process name/s then kill it will kill -9
?
killall
fails a lot for me.
I'm looking to script this for numerous remote machines.
Process name will be one of three.
I want to use something like:
sshpass -p 'password' ssh -n $user@$hostname "one liner to use kill -9"
Any ideas?