Pattern: Use of legacy `STATEMENT`
Issue: -
Backtick command substitution `STATEMENT`
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.
$(STATEMENT)
command substitution has none of these problems, and is therefore strongly encouraged.
Example of incorrect code:
echo "Current time: `date`"
Example of correct code:
echo "Current time: $(date)"