Skip to content

Files

Latest commit

 

History

History
25 lines (15 loc) · 609 Bytes

SC2297.md

File metadata and controls

25 lines (15 loc) · 609 Bytes

Pattern: Use of double qoutes in ${}

Issue: -

Description

ShellCheck found a parameter expansion containing what appears to be a quoted variable name. While the parameter expansion itself must be quoted, as in "${valid}", the quotes may not appear inside the {} as in ${"invalid"}.

Also note that translated strings like $"Hello" may not use curly braces.

Example of incorrect code:

echo ${"USER"}

Example of correct code:

echo "${USER}"

Further Reading