On Tue, 26 Nov 2013 09:58:24 -0500 Randy Barlow wrote:
> On Tue, 26 Nov 2013 11:52:10 +0100
> Hinnerk van Bruinehsen <h.v.bruineh...@fu-berlin.de> wrote:
> > There are some other options of "nesting" as well. You can use
> > backticks "`" or $(...) to run a command "inside" another. An example
> > would be emerge `qlist -CI x11-drivers`  (or the equivalent emerge
> > $(qlist -CI x11-drivers) ) . This would run "qlist -CI
> > x11-drivers" (lists installed packages of the category x11-drivers)
> > and use this output for emerge (which will effectively result in
> > reinstalling every package from the x11-drivers category).
> 
> As I understand it, the $(...) syntax is the preferred way of nesting,
> as opposed to backticks. I think this may be due to backticks requiring
> some special escaping that the $(...) syntax does not require. I
> attempted a brief search for supporting information, but didn't find a
> definitive source to back up my claims :)

The reason for $(...) being preferred is simple: you can nest
$($($(...))), but you can't nest `...`. Deep nesting is quite useful
indeed.

Best regards,
Andrew Savchenko

Attachment: pgpv4whI_T8sT.pgp
Description: PGP signature

Reply via email to