wutt_g
Last Updated: February 25, 2016
·
614
· sheerun

List all process' PPIDs

Function:

ppids(){ echo $1; ppid=$(ps -o ppid= $1) && ppids ${ppid// /} || true; }

Usage:

ppids $$ | xargs ps # current process
ppids 42 | xargs ps # other process
Filed Under