bash force exit code 0 code example Example: bash force exit 0 function a() { ls aaaaa 2>&1 return 0 } a echo $? # prints 0