Capturing a PID.

Craig White plug-discuss@lists.PLUG.phoenix.az.us
Fri, 25 May 2001 10:55:48 -0700


I would suspec that you would ps aux and pipe the output to grep for the
particular string and take the second word of the match to get the process
id

Craig

----:----|----:----|----:----|----:----|----:----|----:----|
- Craig White - PO Box 8634 - Scottsdale, Arizona - 85252
- e-mail address ................ - CraigWhite@AzApple.com
- world wide web address ........ - http://www.AzApple.com
- e-mail my pager address ....... - 6023779752@airtouch.net
- cellular phone ................ - (602) 377-9752
- voice/facsimile ............... - (480) 945-8445
----:----|----:----|----:----|----:----|----:----|----:----|

> -----Original Message-----
> From: plug-discuss-admin@lists.plug.phoenix.az.us
> [mailto:plug-discuss-admin@lists.plug.phoenix.az.us]On Behalf Of Don
> Harrop
> Sent: Friday, July 10, 2893 4:44 PM
> To: plug-discuss@lists.plug.phoenix.az.us
> Subject: Capturing a PID.
>
>
> Does anyone have ideas on how to capture the pid of a program
> into a file as it starts up?  When you execute your program with
> the "&" (background process) the shell spits out the process id
> but I can't seem to redirect that out put to a file.  I don't
> want to use "pidof" after the fact either in case there is
> another process running with the same name.
>
> Don
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail
> doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list  -  PLUG-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss