Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
graton
on March 2, 2024
|
parent
|
context
|
favorite
| on:
Bash Debugging
Very useful is:
PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
When using `set -x` this makes it so that it shows the filename, function name, and line number. Which in larger Bash scripts can be quite handy in debugging.
e40
on March 2, 2024
[–]
WOW! Thanks! Power user of BASH for a long time and I did not know this.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: