Re: Assignment to integer variable

2010-09-14 Thread Pierre Gaston
On Tue, Sep 14, 2010 at 4:42 PM, Diego Augusto Molina wrote: > > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: x86_64-pc-linux-gnu-gcc > Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -D

Assignment to integer variable

2010-09-14 Thread Diego Augusto Molina
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/sh

trap 'echo "trap exit on ${LINENO}"' EXIT -> wrong linenumber

2010-09-14 Thread Jochen Dekeyser
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -

Re: Bug with local variable

2010-09-14 Thread Pierre Gaston
On Tue, Sep 14, 2010 at 10:27 AM, Mario Jungwirth wrote: > Hello > > I found a bug with local variable. > My source (The directory dosn't exists!!!) > > function test() > { >    local myreturn=$(ls -la /directoryNotExists) >    echo "return value=$?" > } > > The "return value" is now 0! > If i rem

Bug with local variable

2010-09-14 Thread Mario Jungwirth
Hello I found a bug with local variable. My source (The directory dosn't exists!!!) function test() { local myreturn=$(ls -la /directoryNotExists) echo "return value=$?" } The "return value" is now 0! If i remove the "local" the "return value" is 2 <-- this is correct. Is this a bug or