On Thu, Feb 5, 2009 at 7:12 PM, Matthew Woehlke <mw_tr...@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