I am accidentally caught in a desire to reveal the subshell number (BASH_SUBSHELL) from within the script itself, but i get subshell 0
Here is the script's line
echo "Operated from subshell: $BASH_SUBSHELL
Part of the shell's output in terminal
- echo 'Operated from subshell: 0' Operated from subshell: 0
Question Is it possible to reveal the subshell a script is operating from within the script itself?