Need to debug a bash script?

Add the following two lines:

set -x
export PS4='$LINENO '

And you will get the line number and the text of each executed line 🙂

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply