Skip to content

Instantly share code, notes, and snippets.

Joshua Fox coffeejoshua

Block or report user

Report or block coffeejoshua

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:439637f3261d729d061915d9503407fd
#!/usr/bin/env bash
# bash exit cleanup snippet
# By default, the shell will continue on errors (sometimes to your detriment)
# To learn about exit status, visit http://tldp.org/LDP/abs/html/exit-status.html
# To learn about the set builtin, visit https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# To learn about traps, visit http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
# We use set -e to exit immediately if a command exits with a non-zero status.
You can’t perform that action at this time.