A better debugger for your Bash scripts: http://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.
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-07 Tony Lawrence
The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code. (Paul Graham)