Sergey Zaharchenko wrote:
Hello Eric!
Mon, Dec 12, 2005 at 10:04:51AM -0600 you wrote:
I was wondering if someone could explain why it is sometimes there and
not other times.
Sometimes the ps process manages to catch the system state when grep has
not been started yet by the shell. Sometimes it doesn't.
And how I should correctly go about detecting if the
process is running before I perform my action.
You may use the -c flag of ps:
-c Change the ``command'' column output to just contain the exe-
cutable name, rather than the full command line.
Like:
[EMAIL PROTECTED]:~> ps axc |grep init
1 ?? ILs 0:00,00 init
Yes... Of course. That's the solution I'm looking for.
Good thing I read over that man page before I posted my msg... Or I
could've embarrassed myself. :}
Thanks.
--
Regards,
Eric
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"