Description of problem: $ i=0 $ let ++i $ echo $i 1 $ let tmp="foo.a"+0 bash: let: tmp=foo.a+0: syntax error: invalid arithmetic... $ i=0 $ let ++i $ echo $i 0 --> every further use of 'let' will generate bogus results. bash-3.1 returns expected results. Version-Release number of selected component (if applicable): bash-3.2-9.fc7 How reproducible: 100%
upstream report at http://article.gmane.org/gmane.comp.shells.bash.bugs/10506
You can get around it short term by using POSIX syntax: i=$(( $i + 1 )) I'm looking to see what changed between 3.1 & 3.2 and go from there.
no; same happens with pure POSIX expressions: $ : $(( tmp=foo.a+0 )) bash: tmp=foo.a+0 : syntax error: invalid arithmetic... $ i=0 ; : $(( ++i )) ; echo $i 0 Patch 20 seems to fix related errors but I did not tested recent version yet.
I debugged it and found the cause, let's see what upstream thinks about my proposed solution: http://article.gmane.org/gmane.comp.shells.bash.bugs/10729
Should be fixed in bash-3.2-19.fc9, I'll release f7 update sooner or later.
bash-3.2-19.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update bash'
bash-3.2-19.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update bash'
bash-3.2-19.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.
bash-3.2-19.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.