ps -ef | grep PROCESS_NAME | awk '{print $2}' | xargs sudo kill -9
Example for phantomjs:
ps -ef | grep phantomjs | awk '{print $2}' | xargs sudo kill -9
based on https://stackoverflow.com/questions/28465754/how-to-kill-phantomjs-processes-running-in-background-after-the-tests-are-comple
Example for
phantomjs:based on https://stackoverflow.com/questions/28465754/how-to-kill-phantomjs-processes-running-in-background-after-the-tests-are-comple