Skip to content

Instantly share code, notes, and snippets.

@T1T4N
Created August 14, 2025 14:07
Show Gist options
  • Save T1T4N/0a319accda985f575fa5ba4b45ce4799 to your computer and use it in GitHub Desktop.
Save T1T4N/0a319accda985f575fa5ba4b45ce4799 to your computer and use it in GitHub Desktop.
Getting decent error reports in Bash when you're using 'set -e'
# Source: https://utcc.utoronto.ca/~cks/space/blog/programming/BashGoodSetEReports
trap 'echo "Exit status $? at line $LINENO from: $BASH_COMMAND"' ERR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment