Created
          August 11, 2015 04:34 
        
      - 
      
- 
        Save kjbrum/ced851437f3fb8190299 to your computer and use it in GitHub Desktop. 
Revisions
- 
        Kyle Brumm created this gist Aug 11, 2015 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/bin/bash if [ -z "$1" ]; then echo "You need to supply a search string..." else processes=$(ps aux | grep $1 -i | awk -F ' ' '{print $2}' | xargs) echo "Processes: "$processes while true; do read -ep "Are you sure you want kill all '$1' processes? [y/N] " yesno case $yesno in [Yy]* ) echo 'Killing processes...' for i in $processes; do kill $i; done echo "Processes Killed: " $processes break;; * ) echo "Skipped killing processes..." break;; esac done fi 
 Kyle Brumm
              created
            
            this gist
            
              Kyle Brumm
              created
            
            this gist