I want to use ps -ef | grep \"keyword\" to determine the pid of a daemon process (there is a unique string in output of ps -ef in it).
ps -ef | grep \"keyword\"
I can kill the pr
Try
ps -ef | grep "KEYWORD" | awk '{print $2}'
That command should give you the PID of the processes with KEYWORD in them. In this instance, awk is returning what is in the 2nd column from the output.
awk