shell script implementation of man
Paul Smith
paul at mad-scientist.us
Wed Nov 19 17:28:33 UTC 2008
On Wed, 2008-11-19 at 18:01 +0100, Yann E. MORIN wrote:
> Do not forget that back-ticks are not POSIX, while $() is.
Uh... what?!?! That's absolutely not true. Backticks are
unquestionably defined in the POSIX sh definition. They are not marked
as "old" or "deprecated" or anything similar.
It's easier to nest command substitutions with $() and there is a very
slight difference in handling backslashes, but otherwise there is no
difference between them.
> Even bash considers the use of back-ticks (backquotes) to
> be /old-style/.
They don't mean it in a pejorative sense. They just mean it as a
description: it _IS_ old-style. But that doesn't make backticks wrong
or bad or to be avoided. Full quote:
When the old-style backquote form of substitution is used, ...
> I'd say that such shell scripts should be POSIX compliant. That sure
> rules out non-POSIX shells, but is standards-compliant.
Since `` is perfectly standards-compliant AND it's far more portable
than $(), I don't see any reason to avoid `` except as a matter of
style.
More information about the busybox
mailing list