Last active
August 29, 2015 14:07
-
-
Save IsoLinearCHiP/1295a5a7885d86dbd03a to your computer and use it in GitHub Desktop.
Bash, get ppid
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
| ppid() { { if [ -z $1 ]; then read -p "PID: " pid; fi; ps -p ${pid:-$$} -o ppid= ;} | awk '{print $1}' ;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment