This is a discussion on list all child process within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hi, how to list only childs of a process? i tried ptree command but o/p results the complete tree ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, how to list only childs of a process? i tried ptree command but o/p results the complete tree but i am interested only in childs. i tried workaround by using ptree and awk CMD=`ptree $pid | $AWK 'BEGIN {i=0} /processName/ { i= 1; } { if ( i==1) print \$1 }'` but ptree truncates the process name if the tree is large so my combination of awk and ptree is failing. Thanks and Regards, Devah |
| ||||
| On 2007-08-01 19:40:44 +0100, gdevah@gmail.com said: > Hi, > how to list only childs of a process? i tried ptree command but o/p > results the complete tree but i am interested only in childs. How about "pgrep -P <ppidlist>"? Cheers, Chris |