I find mysefl running ps -ef | grep WORD (usually Safari but sometimes other things) alot. The Safari 4 beta is nice but still has some issues and it keeps locking up on me when I forget and use Conkerors navigation commands. Maybe I should just force myself to spend more time in Conkeror since its more emacs friendly. Not wanting to continue typing the same thing over and over again I wrote this:
#!/bin/sh #filter ps -ef output by argument and #show user pid’s and process application name #give option to kill a pid pids=`ps -ef | grep $1 | awk ’ { print $2,$8 } ’ ` echo ” echo ” PIDS Found” echo ” ------------------------” echo “$pids” | cat -n echo ” ------------------------” echo ” #ask for a number to kill echo ” Process to kill (0 to exit): ” read process if [ $process -eq 0 ]; then exit 0 else echo `kill $process` exit 0 fi
To run it: $mykill “search terms’