Skip to content

Instantly share code, notes, and snippets.

@corburn
Created May 13, 2015 14:51
Show Gist options
  • Save corburn/709d8e9ffaa180370652 to your computer and use it in GitHub Desktop.
Save corburn/709d8e9ffaa180370652 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# A boilerplate script template
#
# https://google-styleguide.googlecode.com/svn/trunk/shell.xml
# http://shelldorado.com/goodcoding/
#######################################
# Cleanup files from the backup dir
# Globals:
# BACKUP_DIR
# ORACLE_SID
# Arguments:
# None
# Returns:
# None
#######################################
err() {
echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')]: $@" >&2
}
if ! do_something; then
err "Unable to do_something"
exit "${E_DID_NOTHING}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment