[LEDE-DEV] [PATCH v3 04/13] scripts: $/${} is unnecessary on arithmetic variables

Jo-Philipp Wich jo at mein.io
Thu Oct 6 07:07:42 PDT 2016


Hi,

removing the dollar signs lets expressions succeed which would otherwise
fail - which means it introduces a behavior change.

root at jj:~# ash -c 'echo $((undef1 + undef2))'
0
root at jj:~# ash -c 'echo $(($undef1 + $undef2))'
ash: arithmetic syntax error
root at jj:~#

~ Jo



More information about the Lede-dev mailing list