[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Migrating from tcsh to bash (issues)
From: |
Simos |
Subject: |
Re: Migrating from tcsh to bash (issues) |
Date: |
Tue, 3 Feb 2009 21:19:12 +0000 |
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 <fvulto@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
>
Re: Migrating from tcsh to bash (issues), Stephane CHAZELAS, 2009/02/03