bash: warning: shell level (1000) too high, resetting to 1

I just tried to run this command:

/etc/ssl/acme/acme.sh --log /var/log/p3x/acme/acme.sh.log --home /etc/ssl/acme --force --issue -d patrikx3.tk -w /var/www/acme-challenge

I got this error:

bash: warning: shell level (1000) too high, resetting to 1

What is this error?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Shell Level identify the level of sub-shell in a nested shell

Bash man – Shell Level SHLVL

SHLVL – Incremented by one each time a new instance of Bash is
started.

  • This is intended to be a count of how deeply your Bash shells
    are nested.

As you can see here

When bash execute itself the bash shell level is higher in 1

The following recursive call to bash:

$ echo "bash haha" > haha
$ bash haha

Got this message periodically:

bash: warning: shell level (1000) too high, resetting to 1

The meaning of the error above is that bash called itself 1000 times

Another example how $SHLVL variable tracks your shell nesting level:

$ echo $SHLVL
1
$ bash
$ echo $SHLVL
2
$ exit
$ echo $SHLVL
1


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x