[Top][All Lists]

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

Re: [Help-bash] Why should [[ reset BASH_COMMAND in trap?

From: Chet Ramey
Subject: Re: [Help-bash] Why should [[ reset BASH_COMMAND in trap?
Date: Wed, 5 Dec 2018 09:10:11 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 12/5/18 1:51 AM, Peng Yu wrote:
> Hi,
> See the code below. [[ set BASH_COMMAND to [[ itself. But according to
> the manual, should BASH_COMMAND remain as the command that causes the
> trap (i.e., "(exit 3)", in this case). Do I misunderstand anything in
> the manual or this is a bug of Bash?

Thanks for the report. The conditional and arithmetic commands should not
be resetting BASH_COMMAND.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden

reply via email to

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