bug-bash
[Top][All Lists]
Advanced

[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: Thu, 5 Feb 2009 20:32:55 +0000

On Thu, Feb 5, 2009 at 7:12 PM, Matthew Woehlke
<mw_triad@users.sourceforge.net> wrote:
> Simos wrote:
>>
>> 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.
>
> That shouldn't be necessary. An exit of 0 is not considered an error, and so
> should not trip an ERR trap. Freddy's example should be sufficient. (WFM
> with 3.2, anyway.)

That's right. I reverted to the version that Freddy gave earlier.

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

Cheers,
Simos




reply via email to

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