X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fprocesses%2Fpszap.sh;fp=scripts%2Fprocesses%2Fpszap.sh;h=31e119f838bd215c738e2f786f5aa2377e25ef05;hb=3ce4056145ddf83646f0e3865ad5f9ae9da98cde;hp=0000000000000000000000000000000000000000;hpb=f8348089caebfaec0bf14f148ea5a34074319117;p=feisty_meow.git diff --git a/scripts/processes/pszap.sh b/scripts/processes/pszap.sh new file mode 100644 index 00000000..31e119f8 --- /dev/null +++ b/scripts/processes/pszap.sh @@ -0,0 +1,24 @@ +#!/bin/bash +if [ -z "$1" ]; then + echo "Did not find a parameter to seek out and whack from the process list." + exit 2 +fi + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +PIDLIST=$(psfind $1) +#echo "PIDS are $PIDLIST" +if [ -z "$PIDLIST" ]; then + echo "Your process name was not found in the system." + exit 1 +fi +echo "Here are the processes matching your pattern:" +ps $PIDLIST +echo "Are you sure you want to kill all of these? [y/N] " +read answer +if [ "$answer" = "Y" -o "$answer" = "y" ]; then + kill -9 $PIDLIST +else + echo "You chose not to zap the processes." +fi +