#function awkkill() #{ ps aux | awk -v proc=$1 '{if ($11 ~ proc || $12 ~ proc) print $2;}' > term.tmp proc=`cat term.tmp` if [[ ${#proc} != 0 ]] then echo "Killing program '$1' which is process $proc..." kill $proc if [[ $? == 0 ]] then echo "*** Terminated ***" fi rm term.tmp else echo "*** Program doesn't exist! ***" fi #} function lengthTest() { if [[ ${#1} != 0 ]] then return 0 else return 1 fi }