Files
shellScripting/exit_return_codes/exercise3.sh

19 lines
266 B
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# <Replace with the purpose or description of of this shell script.>
#
cat /etc/shadow
if [ "$?" -ne "0" ]
then
echo "Command failed"
exit 1
else
echo "Command succeeded"
exit 0
fi
# Exit with an explicit exit status.
exit 0