Declaring variables as local effects command status $?

2009-02-06 Thread Michael Rendell
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC

Re: Declaring variables as local effects command status $?

2009-02-07 Thread Michael Rendell
Hi, On Friday 06 February 2009 17:02, Paul Jarc wrote: > Michael Rendell wrote: > > local x=$( echo hi; exit 20); > > ret=$? > > Here you're getting the exit status of "local" itself, which is 0. If > you want the exit status of the comma