exercise2 and exercise3, add functions folder

This commit is contained in:
mlot
2026-05-13 14:09:30 -04:00
parent cac0aea0c3
commit 523f4b0809
2 changed files with 37 additions and 0 deletions

18
exit_return_codes/exercise3.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/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