$(...)
notation instead of legacy backticked
`...`
.echo "You are running on `uname`"
echo "You are running on $(uname)"
Backtick command substitution `...`
is legacy syntax
with several issues.
It has a series of undefined behaviors related to quoting in POSIX.
It imposes a custom escaping mode with surprising results.
It's exceptionally hard to nest. $(...)
command
substitution has none of these problems, and is therefore strongly
encouraged.
None.
$(...)
preferred over `...`
(backticks)?`command`
in
shell programming?ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.