in reply to Re: backticks and quotation trouble in bash
in thread backticks and quotation trouble in bash

The $( ... ) syntax for command substitution is not alternative, but is in fact the preferred one according to the POSIX standard.

Backticks/backquotes have long been considered legacy and are deprecated: they are hard to read, and nesting and quoting are problematic.

In the new and more readable form, nesting "just works" and quotes have their own context within the command substitution so it's not necessary to escape them.

See the POSIX documentation for more details.

  • Comment on Re^2: backticks and quotation trouble in bash