mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Updated SC2089 (markdown)
@@ -30,7 +30,7 @@ Similarly, `"My File.txt"` is Bash syntax for a single word with a space in it.
|
||||
|
||||
The solution is to use an array instead, whenever possible.
|
||||
|
||||
If you due to `sh` compatibility can't use arrays, you can use `eval` instead. However, this is very insecure and easy to get wrong, leading to various forms of security vulnerabilities and breakage:
|
||||
If due to `sh` compatibility you can't use arrays, you can use `eval` instead. However, this is very insecure and easy to get wrong, leading to various forms of security vulnerabilities and breakage:
|
||||
|
||||
```sh
|
||||
quote() { local q=${1//\'/\'\\\'\'}; echo "'$q'"; }
|
||||
|
Reference in New Issue
Block a user