When a program runs, it stores its final exit value in the shell var $? .
You can either check that value immediately, or store it in another var eg
note no spaces around the '=' symbol.
Cmds are processed sequentially, so each has to wait for the preceding cmd to complete. You can get around that by using the '&' symbol , which means 'to background the program' eg
and the next cmd will be executed without waiting for completion of the background task.
You can get the pid of the background task from the shell var $!