Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Author mentions using xtrace aka `set -x`. If using xtrace I highly recommend doing:

    export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}:   '
This will then append the filename, function name, and line number to the command being executed. Can make it much easier to find where exactly something is happening when working with larger bash scripts.


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

Search: