1 2 3 4 5 6
#!/bin/sh for i do psu | awk '$NF ~ /^('$i')$/ {printf("/bin/kill %d # %s\n", $2, $0);}' done