This bash idiom captures the exit status code from the previous command that was executed. You can use it to confirm that the last command was successful in your shell script.
Exit Status Code
|Exit Status Idiom||$?|
Here is an example of how you could use it to confirm that a command was executed successfully:
1 2 3 4 5 6 7 8 9 10