what is the reason?# Unix - 噫吁兮,危乎高哉
s*i
1 楼
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.
{
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.