[Pkg-sysvinit-devel] Re: r303 - sysvinit/trunk/debian/initscripts/etc/init.d

Thomas Hood jdthood at yahoo.co.uk
Thu Dec 15 16:52:41 UTC 2005


Petter Reinholdtsen wrote:
> Personally, I prefer `...` to $(...), because I find the former easier
> to read and the latter to close to variable expansion.  But I am fine
> with both, so no need to change it back.


One advantage of $(...) is that it makes it easier to nest quotation marks.

And I actually like the fact that it looks like a variable expansion,
because it works like one.  The parentheses are a nice reminder that a
subshell is created for the purpose.

I used to use `...` too but switched after reading this rant by
Chris Hanson:

<nit>
I wish people would use $( ... ) rather than ` ... `.  Both of these
forms do the same thing, and both are supported by POSIX shells.  But
the former has several advantages, such as proper nesting, simpler
quoting -- _and_ it works properly with Emacs sexp motion commands.

The impression I get is that most people don't realize that $() is
standardized, and not a bash extension.  In fact, POSIX discourages
the use of `` and encourages $() in its place.  So consider yourself
informed, and please use $() instead!
</nit>

-- 
Thomas



More information about the Pkg-sysvinit-devel mailing list