#!/bin/sh pid=`ps -ef | grep wssGateway.js |grep -v grep | awk '{print $2}'` if [ -n "$pid" ] then echo "killing pid: $pid" kill -9 $pid fi