Verifique el éxito del comando de shell
some_command
if [ $? -eq 0 ]; then
echo OK
else
echo FAIL
fi
Nervous Newt
some_command
if [ $? -eq 0 ]; then
echo OK
else
echo FAIL
fi