[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug with local variable

From: Mario Jungwirth
Subject: Bug with local variable
Date: Tue, 14 Sep 2010 09:27:10 +0200


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 do I something wrong?

Mario Jungwirth

reply via email to

[Prev in Thread] Current Thread [Next in Thread]