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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parent process of the current process

Status
Not open for further replies.

wehttam

Technical User
Nov 11, 2002
8
0
0
US
I am sorry to ask such a seemingly basic question....

What is the command to display the parent process id of the current process?

I am writing a script which requires the child process to report the process id of its parent, and append this id to a file. I looked at ps -o "%P" and ps -o ppid ; however these return a column header...

any help is appreciated!

Thanks
 
Is there any variation on the "echo $$" which could display the parent process id?
 
Nevermind......... echo $PPID works perfectly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top