kill all process unattached to a terminal

I need to kill a lots off process running called "keep-hand.ksh".
The problem: I don't want to kill "keep-hand.ksh" process attached to a Terminal (TTY).
The challenge: Doing it, in one line!

My answer:
[pene@donunix] ps -u pene | grep keep-hand.ksh | grep ? | cut -d "?" -f 1 | xargs kill -9

No comments: