I want to simply detect the current subshell level by a variable like $SUBSHELL.I wold like to make it work using `#CODE` orbash.It seems that that `   ` does not execute your .bashrc.I tried puting this in my .bashrc:export SUBSHELL=`    if [ $SUBSHELL -gt 0 ]    then        echo $(($SUBSHELL + 1))    else        echo 0    fi`It isn't working with even bash.
Detection of Bash Subshells
bash;subshell