This is my simplified script.
I am wondering if the proc() can know if it is run directly or through the runner.
#!/bin/bash
runner () {
"${@}"
}
proc() {
eval 'version=$(echo "SUCCESS: **** ${BASH_VERSION} ****")'
echo -e "$version";
return 0
}
runner proc
proc
What do you think?
FUNCNAME
array and pass it through an environment variable, and then unpack it in the script run viabash
, but I don't think there's anything automatic. – Jun 14 '19 at 06:48external_command > >(...)
, the process running inside>(...)
will be a child of the process runningexternal_command
and a granchild of your script. – Jun 14 '19 at 07:13