Related Post: How To Check If Previous Command Run Successfully In Linux Check If Last Command Was Successful Bash