#! /usr/bin/ksh ps -ef | sed 1d | while read user pid ppid junk ; do if [[ $user != root && $ppid = 1 ]] ; then echo $pid fi done exit 0