Bash verificar si CD tiene éxito
some_command
if [ $? -eq 0 ]; then
echo OK
else
echo FAIL
fi
AttractivePenguin
some_command
if [ $? -eq 0 ]; then
echo OK
else
echo FAIL
fi