Skip to content

Instantly share code, notes, and snippets.

@AdeshAtole
Created June 19, 2018 13:42
Show Gist options
  • Save AdeshAtole/8ebd3574513cbd50463ba0abbafd0ac3 to your computer and use it in GitHub Desktop.
Save AdeshAtole/8ebd3574513cbd50463ba0abbafd0ac3 to your computer and use it in GitHub Desktop.
#!/bin/bash
#kills all catalina instances
CAT_PID=`ps -ax | grep catalina | awk '{print $1}'`
PID_COUNT=`echo $CAT_PID | wc -w`
if (( $PID_COUNT < 2 ))
then
echo 'no cat to kill'
exit 1
fi
kill -9 `echo $CAT_PID | awk '{$NF="";print $0}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment