Skip to content

Instantly share code, notes, and snippets.

@nmccready
Created September 25, 2014 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmccready/823b98dfd0c851a32ebb to your computer and use it in GitHub Desktop.
Save nmccready/823b98dfd0c851a32ebb to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -x
ignorePid=$BASHPID
echo my pid: $ignorePid
pids=`findProcs $1 | grep -v "$ignorePid"`
set +x
for i in "${pids[@]}"
do
echo killing $i
kill -9 $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment