grep kill process code example
Example 1: kill all process that match in grep
ps aux | grep -ie amarok | awk '{print "kill -9 " $2}'
ps aux | grep -ie amarok | awk '{print $2}' | xargs kill -9
Example 2: how to kill tasks using grep
kill -9 $(ps aux | grep KeyWordHere | awk '{print $2}')