[WBEL-users] Another Shell Scripting Question
Andrew Vong
andrewvong at finpress.com
Wed Jun 15 09:55:46 CDT 2005
Dear Gurus,
Thanks for all who responded to my previous question. It worked great!
I am now trying to perform a "ps aux | grep "some regular expression" | cut
-f 2 -d ......"
I seem to be having 2 problems.
1) What delimiter should I define for cut? I've tried " " (space) but that
does not work.
2) I usually get 2 processes listed. The actualy one I'm looking for and
the line I just executed. How can I exclude the 2nd process which also
contains the same "grep regular expression" ?
The above is part of a longer one-liner command I'm trying to construct. I
basically want to kill a specific process and I just want to obtain the PID
for it. So, it may end up looking like this??
$ ps aux | grep "some regular expression" | cut -f 2 -d ...... | xargs kill -9
Or something along those lines...
Hope someone out there can help me.
Thanks again. :)
Best Regards,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://beau.org/pipermail/whitebox-users/attachments/20050615/7688d3b3/attachment.htm
More information about the Whitebox-users
mailing list