diff options
author | Denys Vlasenko | 2021-09-25 22:04:45 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-09-25 22:04:45 +0200 |
commit | d84a604830a7ee3f8fb5f3908ae0d54513393a20 (patch) | |
tree | 3e9dc05e082e41328a84c8eaa3d45f36c2ba5d44 /shell/ash_test/ash-arith/arith1.sub | |
parent | 627821e42b06adfe6bbc6004d8eeb7c35f65120d (diff) | |
download | busybox-d84a604830a7ee3f8fb5f3908ae0d54513393a20.zip busybox-d84a604830a7ee3f8fb5f3908ae0d54513393a20.tar.gz |
shell: fix arithmentic evaluation of "++7" and such (it is + + 7, i.e. 7)
function old new delta
evaluate_string 945 988 +43
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-arith/arith1.sub')
-rwxr-xr-x | shell/ash_test/ash-arith/arith1.sub | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash_test/ash-arith/arith1.sub b/shell/ash_test/ash-arith/arith1.sub index 80aa999..a36785c 100755 --- a/shell/ash_test/ash-arith/arith1.sub +++ b/shell/ash_test/ash-arith/arith1.sub @@ -35,6 +35,6 @@ echo 1 $a #ash# (( ++ )) ( echo $(( +++7 )) ) -# bash 3.2 apparently thinks that ++ +7 is 7 -#ash# echo $(( ++ + 7 )) +# ++ is not a inc operator on non-variable, it is the + + sequence +echo $(( ++ + 7 )) #ash# (( -- )) |