[NTLUG:Discuss] PID of program started from bash?

Rusty Haddock rusty at fe2o3.lonestar.org
Tue Oct 12 23:56:52 CDT 2004


Jack Snodgrass wrote:
    >how do you get the PID of a program that you start from a bash script? 

C'mon Jack, man is your friend. :-)

	man bash

Then, in the pager, search for \$ and you'll find the answer.
To keep a short answer from getting too long, try

	echo $!

It's like this in just 'bout all the "older" shells, like ksh, sh,
and csh.

	-Rusty-
-- 
   _____        Rusty Haddock  =  KD4WLZ  =  rusty at fe2o3.lonestar.org
|\/   o \   o  **Out yonder in the Van Alstyne (TX) Metropolitan Area**
|   (  -<  O o              Microsoft is to software what
|/\__V__/                  McDonalds is to gourmet cooking



More information about the Discuss mailing list