function testF2
{
return 0
}
testF2
return1=$?
echo "testF2 return: " $return1
If return 0; output is: 0
If return 1; output is: 1
If return 11; output is: 11
If return 111; output is: 111
If return 1111; output is: 87 why?
If return 11111; output is: 103 why?
If return 111111; output is: 7 why?
If return 1111111: output is: 71 why?
thx alot.
H***a 发帖数: 189
2
it's return1 % 128
unsigned short?
【在 s*****i 的大作中提到】 : function testF2 : { : return 0 : } : testF2 : return1=$? : echo "testF2 return: " $return1 : If return 0; output is: 0 : If return 1; output is: 1 : If return 11; output is: 11