bug-bash
[Top][All Lists]
Advanced

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

BASH_COMMAND


From: Brian J. Murrell
Subject: BASH_COMMAND
Date: Fri, 25 Aug 2006 13:55:56 -0400

Is there something I am mis-understanding about $BASH_COMMAND?  The
manpage says:

       BASH_COMMAND
              The command currently being executed or about  to  be  executed,
              unless the shell is executing a command as the result of a trap,
              in which case it is the command executing at  the  time  of  the
              trap.

However:

$ trap 'echo $BASH_COMMAND' ERR
$ false
echo $BASH_COMMAND

So, in the trap, $BASH_COMMAND seems to contain the line command being
executed in the trap.  I would have expected to see:

$ trap 'echo $BASH_COMMAND' ERR
$ false
false

given the explanation in the manpage.

I must be misunderstanding something.

b.

-- 
My other computer is your Microsoft Windows server.

Brian J. Murrell

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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