LINE_NUM incrementation seems to be incompatible with bash shipped with Ubuntu 12.04.2
Bug: LINE_NUM incrementation throws an "exception" when run in bash that ships with Ubuntu 12.04.2. Error was caught when using bash 'trap' mechanism to do exception handling.
Proposed solution: change ((LINE_NUM++)) to LINE_NUM=$(($LINE_NUM + 1))
Thanks for the report. Are you sure that you are using bash and not another shell? Is the test script also failing?
./test/test.sh
Hi Ruediger,
I believe that I'm using bash, but I'm not 100% sure because the error only shows up when I run the script through sudo (and there are multiple layers of scripts). I just checked that '((A++))' works from the shell prompt when I log into the machine, so I probably misreported the error as originating from bash.
I'll try to run the unit tests sometime soon and let you know if they fail.
Cheers, Kevin
Kevin Chu, PhD Data Scientist, Applied Mathematician, Scientist, Software Architect Serendipity Research
[email protected] http://ktchu.serendipityresearch.org
On May 30, 2013, at 2:50 PM, Ruediger Meier [email protected] wrote:
Thanks for the report. Are you sure that you are using bash and not another shell? Is the test script also failing? ./test/test.sh — Reply to this email directly or view it on GitHub.