Skip to content

Instantly share code, notes, and snippets.

@euank
Created December 3, 2016 00:58
Show Gist options
  • Select an option

  • Save euank/17ec654bb4ecb76cb5b51c79ae30be6f to your computer and use it in GitHub Desktop.

Select an option

Save euank/17ec654bb4ecb76cb5b51c79ae30be6f to your computer and use it in GitHub Desktop.
$ cat file.sh
#!/bin/bash
set -e
function command_not_found_handle {
echo "Command not found: $1"
exit 1
}
if [[ "dne" == "dne" ]] && "dne" == "dne" ]]; then
echo yes
else
echo no
fi
echo "did not exit"
$ ./file.sh
Command not found: dne
no
did not exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment