Created
August 4, 2018 08:38
-
-
Save basith374/07de71d412886ed44e84019dff1bcb98 to your computer and use it in GitHub Desktop.
get child processes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getcpid() { | |
| cpids=`pgrep -P $1|xargs` | |
| for cpid in $cpids; | |
| do | |
| echo "$cpid" | |
| getcpid $cpid | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment