1 2 3 4 5 6 7 8
f() { false; return; echo BAD; }; { f; echo One:$?; }; echo Zero:$? f() { false; return; }; f; echo One:$? f() { return 5; }; f; echo Five:$?