$SHLVL  –  Bash Nesting Level

$SHLVL contains the level of nested Bash shells.

Examples

Print the nesting level of the Bash process:
1
echo $SHLVL
BashSupport Pro is a Bash IDE with support for $SHLVLtry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal