help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Which is preferred? '`' or '$('?


From: Dan Douglas
Subject: Re: [Help-bash] Which is preferred? '`' or '$('?
Date: Tue, 12 Mar 2013 00:07:49 -0500
User-agent: KMail/4.8.3 (Linux/3.4.6-pf+; KDE/4.8.3; x86_64; ; )

On Monday, March 11, 2013 07:59:24 PM Peng Yu wrote:
> Hi,
> 
> It seems that $( is a more recent form as it is mentioned in the
> manual "When the old-style backquote form of substitution is used
> ...". Since these two forms, to a certain extend, are the same and $(
> is introduced later, is $( preferred?
>

We have an FAQ here: http://mywiki.wooledge.org/BashFAQ/082

The only complications with $() are minor. A few shells have issues parsing 
case..esac out of them unless the parentheses are all paired. Bash < 4.3 has 
an issue with brace expansions not nesting within them with certain quoting 
patterns.

Basically only use backticks for old Bourne shells.
-- 
Dan Douglas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]