[Top][All Lists]

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

Re: Command substitution and errexit

From: Nikolai Kondrashov
Subject: Re: Command substitution and errexit
Date: Tue, 16 Oct 2012 11:30:09 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7

Hi Chet,

On 10/16/2012 02:13 AM, Chet Ramey wrote:
On 10/15/12 11:23 AM, Nikolai Kondrashov wrote:
I've noticed that errexit is disabled inside command substitution.
Is this intentional?

Yes.  It's been that way since bash-1.14.  The reasons why are lost in
time -- it was 17 years ago, after all -- but probably go something like
not wanting the parent's settings to produce unexpected results in the
child process.

Well, there is nothing for it, then.

Current versions of bash disable -e inside command substitution only when
posix mode is not enabled.

I may need to learn more about posix mode, but so far I'm not inclined to use
it. So, will have to work this around.

Thank you.


reply via email to

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