Shih-Min Lee's Personal website

dating, chating, food, games, search

Follow me on GitHub

😀 Tiny bash script to kill a process by name

store the following code to

if [ $# -ne 0  ]; then
  ps aux | grep $1 | awk '{print $2}' | xargs kill -9
  echo "Usage: \"sh\" ProcessName";

and run sh killProc node to kill 1 process that contains the name node

01 Jul 2016