STD ERROUS BASH

echo $? # to print last command error status
GitPaulo