Let\'s assume I have 3 shell scripts:
script_1.sh
#!/bin/bash ./script_3.sh
script_2.sh
You can simply use the command below to avoid calling cut/awk/sed:
ps --no-headers -o command $PPID
If you only want the parent and none of the subsequent processes, you can use:
ps --no-headers -o command $PPID | cut -d' ' -f1