Day 11 : Error Handling in Shell Scripting
Error Handling in Shell Scripting 🚀
Checking Exit Status ✅:
Use $? to capture the exit status of the last command. If it’s not zero, handle the error.
Example:
bashCopy codemkdir /tmp/mydir
if [ $? -ne 0 ]; then
echo "🚫 Failed to create ...
devopsinsightwithshivani.hashnode.dev5 min read