Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16102

Re: Exclamation mark does not work with set -e

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Exclamation mark does not work with set -e
Date Mon, 6 Apr 2020 10:49:42 -0400
Lines 21
Approved bug-bash@gnu.org
Message-ID <mailman.254.1586184588.2644.bug-bash@gnu.org> (permalink)
References <2f74-5e8b3d80-85-5823c700@26668721> <20200406144942.GN845@eeg.ccf.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1586184589 20783 209.51.188.17 (6 Apr 2020 14:49:49 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To "fb@florentbordignon.fr" <fb@florentbordignon.fr>
Envelope-to bug-bash@gnu.org
Mail-Followup-To "fb@florentbordignon.fr" <fb@florentbordignon.fr>, bug-bash@gnu.org
Content-Disposition inline
In-Reply-To <2f74-5e8b3d80-85-5823c700@26668721>
User-Agent Mutt/1.10.1 (2018-07-13)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From 139.137.100.1
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20200406144942.GN845@eeg.ccf.org>
X-Mailman-Original-References <2f74-5e8b3d80-85-5823c700@26668721>
Xref csiph.com gnu.bash.bug:16102

Show key headers only | View raw


On Mon, Apr 06, 2020 at 04:33:15PM +0200, fb@florentbordignon.fr wrote:
> Hello,
> 
> The following assertion succeeds when it should not :
> set -e
> ! true
> echo Hello # prints Hello but should not

              -e      Exit  immediately  if a pipeline (which may consist of a
                      single simple command), a list, or  a  compound  command
                      (see SHELL GRAMMAR above), exits with a non-zero status.
                      The shell does not exit if the  command  that  fails  is
                      part  of  the command list immediately following a while
                      or until keyword, part of the test following the  if  or
                      elif  reserved  words, part of any command executed in a
                      && or || list except the command following the final  &&
                      or ||, any command in a pipeline but the last, or if the
                      command's return value is being inverted with !.

(snip)

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Exclamation mark does not work with set -e Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-06 10:49 -0400

csiph-web