Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display PID

Status
Not open for further replies.

kozlow

MIS
Mar 3, 2003
326
US
Display Script PID from script... Can not remember how I did it... Getting old....
 
Might be better ways to do it but this works for me

In this case I'm looking for the PID of rssqserv and NOT a PID owned by root

`ps -eaf | grep rssqserv | egrep -v grep | egrep -v root|awk '{print$2}'`

Norm
 
If you want the PID of the script that's running, it's just...
Code:
echo $$

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top