[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exit status when setting local variables
From: |
Mike Frysinger |
Subject: |
exit status when setting local variables |
Date: |
Thu, 23 Mar 2006 18:39:41 -0500 |
User-agent: |
KMail/1.9.1 |
not sure if this is a bug or feature ... take this little snippet:
testit() {
local foo=$(false) ; echo $?
foo=$(false) ; echo $?
}
when we run the code, the output is:
0
1
rather than intuitive:
1
1
-mike
- exit status when setting local variables,
Mike Frysinger <=