Why is $(...) preferred over `...` (backticks)?

`...` is the legacy syntax for command substitution, required by only the very oldest of non-POSIX-compatible Bourne shells. There are several reasons to always prefer the $(...) syntax:

Important differences

Other advantages

See also:

BashFAQ/082 (last edited 2022-02-19 00:13:59 by larryv)