mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-04 11:49:42 +08:00
Updated Sc2086 (markdown)
@@ -11,7 +11,7 @@ The problematic code looks like "print the first argument". It's actually "Split
|
|||||||
|
|
||||||
Quoting prevents word splitting and glob expansion, and prevents the script from breaking when input contains spaces, line feeds, glob characters and such.
|
Quoting prevents word splitting and glob expansion, and prevents the script from breaking when input contains spaces, line feeds, glob characters and such.
|
||||||
|
|
||||||
Note that `$( )` starts a new context, and variables in it has to be quoted separately:
|
Note that `$( )` starts a new context, and variables in it have to be quoted independently:
|
||||||
|
|
||||||
echo "This $variable is quoted $(but this $variable is not)"
|
echo "This $variable is quoted $(but this $variable is not)"
|
||||||
echo "This $variable is quoted $(and now this "$variable" is too)"
|
echo "This $variable is quoted $(and now this "$variable" is too)"
|
||||||
|
Reference in New Issue
Block a user