$
is not used specially and should therefore be escaped.Note: Removed in v0.3.3 - 2014-05-29
echo "$"echo "\$"$ is special in double quotes, but there are some cases
where it's interpreted literally:
echo "\$""foo$") or before some constructs
("$'foo'").To avoid relying on strange and shell-specific behavior, any
$ intended to be literal should be escaped with a
backslash.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.