summaryrefslogtreecommitdiff
path: root/helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'helper.sh')
-rwxr-xr-xhelper.sh13
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
+}
+
+$@