4 ms·
Bash with Debugger and Improved Debug Support and Error Handling
- westurner 1y agoThere are libraries for unit testing shell scripts. And also, From https://news.ycombinator.com/item?id=26906351 https://news.ycombinator.com/item?id=26906351 : > From "Bash Error Handling" https://news.ycombinator.com/item?id=24745833 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