A better debugger for your Bash scripts: https://bashdb.sourceforge.net/. Actually, it replaces Bash, so if your script was particularly strange, you might exhibit a problem when it runs under bash but not bashdb or vice versa.
That would probably be a pretty rare circumstance though.. and I can tell you that I have wanted to single-step through a shell script more than once, not because the script was broken but just because I wanted to control it more easily than messing it up with additional "read junk" lines. So maybe this is worth taking a look at it.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-07 Tony Lawrence