mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Updated SC2004 (markdown)
@@ -24,4 +24,4 @@ $ echo $((a * 5)) # evaluates as (1+1)*5
|
||||
10
|
||||
```
|
||||
|
||||
The `$` is unavoidable for special variables like `$1` vs `1`, `$#` vs `#`. ShellCheck does not warn about these cases.
|
||||
The `$` is unavoidable for special variables like `$1` vs `1`, `$#` vs `#`. It's also required when adding modifiers to parameters expansions, like `${#var}` or `${var%-}`. ShellCheck does not warn about these cases.
|
||||
|
Reference in New Issue
Block a user