Question : bash force exit 0
Answered by : elegant-elk-wyjd467mu8aj
function a() { ls aaaaa 2>&1 return 0
}
a
echo $? # prints 0
Source : https://stackoverflow.com/questions/36130299/how-to-return-exit-code-0-from-a-failed-command | Last Update : Mon, 01 Feb 21