Question : bash exit code status last command
Answered by : philip-gelinas
# The special variable $? returns the exit status of the last executed command:
echo $?
Source : https://linuxize.com/post/bash-exit/#exit-status | Last Update : Sun, 17 Oct 21