Issue
I have a series of command to execute. However I need to exit whenever 'command is not found' error occurs. So post execution check of output is not an option
The "$?" variable is equal zero when 'command is not found' and on success.
Solution
If this should be done from a script, it's natural to use a conditional to express this kind of behaviour:
asdf 2> /dev/null || exit 1
Answered By - user1019830 Answer Checked By - Willingham (WPSolving Volunteer)