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
Written by Adam Stankiewicz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#