[Top][All Lists]

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

Re: [BUG] ERR trap triggered twice when using 'command'

From: Greg Wooledge
Subject: Re: [BUG] ERR trap triggered twice when using 'command'
Date: Mon, 2 Apr 2018 10:50:06 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Apr 02, 2018 at 02:35:28PM +0000, Nick Chambers wrote:
> On 4/1/18, 5:54 AM, "bug-bash on behalf of Martijn Dekker" <address@hidden on 
> behalf of address@hidden> wrote:
>     $ bash -c 'trap "echo WHOA" ERR; command false'
>     WHOA
>     WHOA
>     Expected output: just one WHOA (as on *ksh, zsh)
>     Thanks,
>     - M.
> Please use the bashbug tool to submit the bug, so those that look at this can 
> get some meaningful information about your environment (and at the very 
> least, can know what version of bash you’re using).

For the record, I can reproduce this output using bash 4.4.12 (the one
built by Debian) on Debian 9 amd64.  As to whether this constitutes a bug,
I do not have an opinion yet.

Also happens in self-compiled bash 2.05b on the same computer.  Probably
every version, but I didn't try any others.

reply via email to

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