ash / shell scripting question / abort after Arithmetic Evaluation
Bastian Bittorf
bittorf at bluebottle.com
Wed Jun 24 21:03:44 UTC 2015
we stumbled over an interesting behaviour,
which is the same like in bash, but new to us:
root at box:~ a=120; echo $(( a / 60 )); echo HERE
2
HERE
root at box:~ a=; echo $(( a / 60 )); echo HERE
0
HERE
root at box:~ a=; echo $(( $a / 60 )); echo HERE
-ash: arithmetic syntax error
root at box:~ echo $(( / 60 )); echo HERE
-ash: arithmetic syntax error
can somebody explain, why the execution stopped
totally in the last 2 examples? this was the root-cause
for a not removed 'lock'-dir in one of our scripts...
bye, bastian
More information about the busybox
mailing list