Question : check exit code of a command bash
Answered by : titus-kemboi-cheserem
if [ $? -eq 1 ]
then echo "blah blah blah"
fi
Source : https://stackoverflow.com/questions/26675681/how-to-check-the-exit-status-using-an-if-statement | Last Update : Wed, 14 Sep 22