mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2116 (markdown)
@@ -25,7 +25,7 @@ You can just replace `$(echo myvalue)` with `myvalue`.
|
||||
### Exceptions
|
||||
|
||||
Sometimes this pattern is used because of side effect of `echo` or expansions. For example, here `$(echo ..)` is used to expand a glob.
|
||||
```
|
||||
```sh
|
||||
glob="*.png"
|
||||
files="$(echo $var)"
|
||||
```
|
||||
@@ -39,7 +39,7 @@ The `echo` is not useless, but this code is problematic because it concatenates
|
||||
All three methods will let you avoid issues with special characters in filenames.
|
||||
|
||||
As another example, here `$(echo ..)` is used to expand escape sequences:
|
||||
```
|
||||
```sh
|
||||
unexpanded='var\tvalue'
|
||||
expanded="$(echo "$var")"
|
||||
```
|
||||
|
Reference in New Issue
Block a user