Summarize: killing with awk and grep
Tricia Gardenhire
tgardenh at nmsu.edu
Sat Aug 12 00:23:30 AEST 1989
Thanks to all who sent me their ideas. I think I understand a little
more about how grep, and awk work now. Any way, to summarize, the
easiest way to do this was:
kill `ps -aux | fgrep -e -sleeper | egrep -v fgrep | awk '{print $2}'`
Most other ideas were similar, but were more involved shell scripts.
For others who wish to use this, just change "-sleeper" to whatever
process you need to kill.
Thanks again for all the help.
-Trish
More information about the Comp.unix.questions
mailing list