Re: unable to capture return value using backticks and local

2006-08-08 Thread Paul Jarc
"Adam Monsen" <[EMAIL PROTECTED]> wrote: > foo() > { >local TICKED=`false` >echo RV: $? > } > > foo > # prints "RV: 0", but I would expect "RV: 1" You get 0 here because that's the status from the "local" command. To get the status from a backtick command, you need the assignment to be al

Re: unable to capture return value using backticks and local

2006-08-08 Thread Chet Ramey
Adam Monsen wrote: > Bash Version: 3.1 > Patch Level: 7 > Release Status: release > > Description: >When a variable is declared local and the assigned value is > gathered from > a command enclosed in backticks, it is not possible to retrieve the > return value > of the function within the

unable to capture return value using backticks and local

2006-08-08 Thread Adam Monsen
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/sh

String concatenation bug in bash-3.1.17

2006-08-08 Thread Igor Peshansky
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -