On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Wed, Oct 18, 2006 at 07:42:56PM -0700, Carl Lowenstein wrote:
> Is anyone other than "seb" running "start.py"?
I thought you might wonder that. The problem is when
root grep's for start.py. That very search itself enters
the ps table!
All right, this is a problem with a classical known solution.
I forgot about that. Same thing in the gawk RE.
grep for [s]tart.py
"[s]tart" matches "start" but does not match itself.
$ kill -HUP $( ps -eo pid,cmd | gawk '/[s]tart.py/{print $1; exit}' )
Also even without the [ ] trick to eliminate the extra match, the gawk
one-liner exits after the first match. Under normal circumstances,
the self-match result will come after the one you really want.
"Normal circumstances" probably means that PIDs haven't wrapped.
carl
--
carl lowenstein marine physical lab u.c. san diego
[EMAIL PROTECTED]
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list