Kill Bill

#!/bin/sh
for PROC in `ps x | grep bill | cut -d ' ' -f 1`
do
  kill -9 $PROC
done
Vote up this code0
  • Elb

    Poor shell programming: backticks, piping grep into cut, should be:

    #!/bin/sh
    pgrep -G bill | xargs kill -9

    • ray brooks

      haha! ace thanks for setting me right!