Thanks Paul, Freddy, Chet.

Regarding printexitvalue, I use

trap '__exit_value_bashrc=$?; if [ $__exit_value_bashrc -ne 0 ]; then
echo "Exit $__exit_value_bashrc"; fi' ERR

so that an exit value is printed when it is other than 0.

I pushed all changes to
http://github.com/simos/bashrc/

Cheers,
Simos

On Tue, Feb 3, 2009 at 8:32 PM, Freddy Vulto <fvu...@gmail.com> wrote:
> My mistake, the 'trap' of (5) needs to be defined within single quotes
> to prevent the $? from expanding too soon:
>
>   $ trap 'echo Exit $?' ERR
>
> Freddy Vulto
>


Reply via email to