-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2006
Xiao Liang edited this page Jan 27, 2017
·
19 revisions
echo "Current time: `date`"
echo "Current time: $(date)"
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.
None.