[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SHLVL is a random string (uninitialized string in C) when its true value
From: |
ziyunfei |
Subject: |
SHLVL is a random string (uninitialized string in C) when its true value is "1000" |
Date: |
Thu, 17 Sep 2015 12:29:31 +0800 |
$ SHLVL=998 bash -c 'echo $SHLVL'
999
$ SHLVL=999 bash -c 'echo $SHLVL'
$ SHLVL=999 bash -c 'echo -n "$SHLVL" | hexdump'
0b 01
$ SHLVL=999 bash -c 'echo -n "$SHLVL" | hexdump'
0f 01
$ SHLVL=999 bash -c 'echo -n "$SHLVL" | hexdump'
04 01
$ SHLVL=1000 bash -c 'echo $SHLVL'
bash: warning: shell level (1001) too high, resetting to 1
1
- SHLVL is a random string (uninitialized string in C) when its true value is "1000",
ziyunfei <=