Bash Scripting - Error Handling
Why does this script fail to run cleanup on exit?
#!/bin/bash
trap 'cleanup' EXIT
cleanup() {
echo "Cleaning up"
}
exit 0
#!/bin/bash
trap 'cleanup' EXIT
cleanup() {
echo "Cleaning up"
}
exit 0
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions