Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Bash with Debugger and Improved Debug Support and Error Handling (sourceforge.net)
1 point by thunderbong 4 months ago | hide | past | favorite | 1 comment


There are libraries for unit testing shell scripts.

And also,

From https://news.ycombinator.com/item?id=26906351 :

> From "Bash Error Handling" https://news.ycombinator.com/item?id=24745833 : you can display the line number in `set -x` output by setting $PS4:

  export PS4='+(${BASH_SOURCE}:${LINENO}) '
  set -x
And

    trap '(read -p "[$BASH_SOURCE:$LINENO] $BASH_COMMAND?")' DEBUG




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: