Skip to content

Files

Latest commit

 

History

History
27 lines (16 loc) · 717 Bytes

SC2301.md

File metadata and controls

27 lines (16 loc) · 717 Bytes

Pattern: Parameter expansion starts with unexpected quotes

Issue: -

Description

ShellCheck found a parameter expansion ${...} that contains an unexpected syntax element, such as single or double quotes.

In the example, this was due to wrapping a translated string $".." with curly braces, which is not valid.

It is unclear what the intention is with invalid expansions like ${'foo'}, ${$"foo"}, so please look up how to do what you were trying to do.

Example of incorrect code:

echo ${"Hello World"}

Example of correct code:

echo $"Hello World"

Further Reading