Skip to content

Instantly share code, notes, and snippets.

@thameera
Created October 15, 2013 06:08
Show Gist options
  • Save thameera/6987212 to your computer and use it in GitHub Desktop.
Save thameera/6987212 to your computer and use it in GitHub Desktop.
pkill script
#!/bin/sh
# pkill
# be VERY careful with parameter $1
case $1 in
'' )
cat "$0"
;;
* )
for pid in $( ps -aW | grep -i $1 | awk '{ print $4 }' );
do tskill $pid /V;
done
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment