diff options
Diffstat (limited to 'helper.sh')
-rwxr-xr-x | helper.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/helper.sh b/helper.sh new file mode 100755 index 0000000..d51fbab --- /dev/null +++ b/helper.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +ppid() { + printf "$(ps -o ppid= -p $1)" | xargs +} + +gppid() { + PARENT=$(ps -o ppid= -p $1) + GRANDPARENT=$(ps -o ppid= -p $PARENT) + printf "$GRANDPARENT" | xargs +} + +$@ |