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

Parse error in arithmetic expressions with braces #53

Closed
slakichi opened this issue Jun 28, 2019 · 2 comments · Fixed by #187
Closed

Parse error in arithmetic expressions with braces #53

slakichi opened this issue Jun 28, 2019 · 2 comments · Fixed by #187
Labels

Comments

@slakichi
Copy link

echo $(( (1 + 2)))
is OK, but
echo $(((1 + 2) ))
fails.
echo $(( (1 + 2) / 2))
also fails.

@issue-label-bot issue-label-bot bot added the bug label Jun 28, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.83. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@achekulaev
Copy link

Additional examples

#!/bin/bash

a=1
aaa=1

# fails with: expected " somewhere in the file
b=$(( $aaa + ($a * 2) ))

# fails with: failed to parse expression
b=$(( $a + ($a * 2) ))

@amaanq amaanq mentioned this issue Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants