i understood that
a_command || fallback_command
It will catch any non zero exit_code from command_a (i.e when command_a fails) and will run fallback_commad.
How to achieve this for some particular codes? How to make it work like when a_command throws 255 only then run fallback_command ?
I tried to do something like
a_command
VAR=$?
if [ $VAR==255 ]
then
fallback_command
exit 0
fi
But this will not suppress the non zero errors thrown by command_a. I want to suppress the non zero exit_codes.