The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-03-2002
MizzGail's Avatar
MizzGail MizzGail is offline
Registered User
 

Join Date: Sep 2001
Location: Syracuse, NY
Posts: 157
No. thats a lot of info. but doesnt give me an answer.
I am looking for an alternative to this:


for PID in `ps -ef |grep -v root| grep " 1 " | awk '{print $2}'`


The grep " 1" is giving me all processes running under PPID = 1.

I could also awk'{print $3}' and evaluate it for a value of 1

I found in the man pages a switch -p to identify proccesses for a PID.
I am wondering if maybe there is a switch for PPID that I'm missing when I look up the use of ps.