parsed.org

find all ocurrences for a command (in this case python) :

awk '{for(i = 11; i <= NF; i++) printf $i " "; printf "n"}' < <(ps aux | grep python)

kill all ocurrences for a command (python again) :

ps aux | grep python | awk {'print "kill " $2'} | bash

also can be added the -9 signal

ps aux | grep python | awk {'print "kill -9 " $2'} | bash
awkprocessps
RSS