Results 1 to 3 of 3
Why does this not work?
I need to return negative numbers from functions
No matter which negative number (-1 -5 -10) the function always returns 2
Code:
function testfcn{
return ...
- 04-18-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 3
return -1 does not work...?
Why does this not work?
I need to return negative numbers from functions
No matter which negative number (-1 -5 -10) the function always returns 2
please help!!!Code:function testfcn{ return -1 } testfcn echo $? # <- always displays 2
regards!
- 04-18-2010 #2
I believe that bash can only return values 0 - 255 from functions.
Make mine Arch Linux
- 04-20-2010 #3


Reply With Quote