"Tried to reproduce in debian testing squeeze, bash 4.1.5:
and...@debian:~$ bash -c 'trap '\''echo "BC $BASH_COMMAND"'\'' ERR; false
foo'
BC false foo
and...@debian:~$ echo $?
1
and...@debian:~$
I think everything works."
Sorry, the version is wrong. I used 4.1-3.
Tried to reproduce in debian testing squeeze, bash 4.1.5:
and...@debian:~$ bash -c 'trap '\''echo "BC $BASH_COMMAND"'\'' ERR; false
foo'
BC false foo
and...@debian:~$ echo $?
1
and...@debian:~$
I think everything works.
Package: bash
Version: 3.1dfsg-8
According to the manual:
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 t
3 matches
Mail list logo