Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINE_NUM incrementation seems to be incompatible with bash shipped with Ubuntu 12.04.2 #5

Open
ktchu opened this issue May 30, 2013 · 2 comments

Comments

@ktchu
Copy link

ktchu commented May 30, 2013

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))

@rudimeier
Copy link
Owner

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

@ktchu
Copy link
Author

ktchu commented May 30, 2013

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

ktchu@serendipityresearch.org
http://ktchu.serendipityresearch.org


On May 30, 2013, at 2:50 PM, Ruediger Meier notifications@github.com 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants