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
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
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'
-
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
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