Suppose I have the following commands in a script
susd
systemctl status firewalld
If I look at exit code
through echo $?
it returns 0 because the last command was executed successfully, but how can I get the exit code
of the whole block? in my example it should be an exit code 1 or greater because susd
does not exist.