$SHLVL
–
Bash Nesting Level
$SHLVL
contains the level of nested Bash shells.
Links
Examples
- Print the nesting level of the Bash process:
1
echo $SHLVL
BashSupport Pro is a Bash IDE with support for $SHLVL – try it now!