-
Notifications
You must be signed in to change notification settings - Fork 1.9k
SC2322
Joachim Ansorg edited this page Oct 31, 2022
·
2 revisions
value=$(( ((offset + index)) * 512 )) value=$(( (offset + index) * 512 ))ShellCheck found doubly nested parentheses in an arithmetic expression. While the syntax for an arithmetic expansion is $((..)), this does not imply that parentheses in the expression should also be doubled. (x), ((x)), and (((x))) are all identical, so you might as well use only one layer of parentheses.
This is a stylistic suggestion. If you prefer keeping both parentheses, you can ignore this message.
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!