Bash has functionality similar to exceptions in java.
If we want to handle any sort of error, we can add a handler function
and exit with an error code. This sure beats checking exit code
after every command.
function error {
echo Error
exit 1
}
trap error ERR
Tuesday, January 06, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment