# HG changeset patch # User Jeff Hammel # Date 1409954111 25200 # Node ID c24a1b531b7e9fb952bde4d7544d05cdb8e12994 # Parent fa6c6f64e12b33511c8adf901abb862a535f0dcf move isrunning to a shell script and kill killbyname since there is pkill nowadays diff -r fa6c6f64e12b -r c24a1b531b7e .bashrc --- a/.bashrc Wed Sep 03 18:45:04 2014 -0700 +++ b/.bashrc Fri Sep 05 14:55:11 2014 -0700 @@ -318,24 +318,6 @@ emacs +`wc -l "$FILE"` $@ } - -### functions for processes - -isrunning() { - # is a process running? (by name) - # see also: talos for a better version - for i in "$@" - do - ps axwww | grep "$i" | grep -v 'grep' - done | sort | uniq - -} - -killbyname() { - # kill a process by name - kill `isrunning "$@" | awk '{ print $1 }' | onelineit.py` -} - ### buffer() { diff -r fa6c6f64e12b -r c24a1b531b7e bin/isrunning.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/isrunning.sh Fri Sep 05 14:55:11 2014 -0700 @@ -0,0 +1,8 @@ +#!/bin/bash + +# are the given processes running? + +for i in "$@"; +do + ps axwww | grep --colour=auto "$i" | grep --colour=auto -v 'grep'; +done | sort | uniq