bug-bash
[Top][All Lists]
Advanced

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

Re: errexit lost in command substitution


From: Chet Ramey
Subject: Re: errexit lost in command substitution
Date: Tue, 11 Jan 2005 10:05:01 -0500

> bash-3.00$ set -e
> bash-3.00$ echo $-
> ehimBH
> bash-3.00$ echo $(echo $-)
> himBH
> 
> (same for set +o)
> 
> Bug or feature?

Feature.  Command substitution has not inherited the -e option for a
very long time (certainly since before bash-2.0 was released, around
eight years ago).  In posix mode, the setting is inherited, since that's
what I interpret POSIX to say.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    chet@po.cwru.edu    http://tiswww.tis.cwru.edu/~chet/




reply via email to

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