As Awk is a pattern-matching language, you can simplify it to something like this:
ps aux |awk '/what/ {print "kill " $2}'
This will give you a list of kill commands you can review, before piping to |sh to shake off those processes :)And when what you try to do sequentially might take too long, you can consider throwing GNU Parallel [1] in the pipemix!