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