[m-dev.] Command substitution in shell scripts

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Dec 30 14:50:18 AEDT 2022


2022-12-30 14:43 GMT+11:00 "Julien Fischer" <jfischer at opturion.com>:
> One of the issues raised in that then is whether we should use $(...)
> for command substitution in place of `...`. (shellcheck emits a warning
> about the latter begin a legacy construct.)  Are there an objections to
> us moving to the $(...) syntax?

No objection from me. $() syntax is better than `` syntax,
both because it is harder to confuse for other constructs
(since single forward quotes and single backward quotes
differ only by a few pixels in many fonts), and because
it is nestable.

Zoltan.


More information about the developers mailing list