Quick update: I read a nice awk tutorial and part of the official gawk manual .. and I'm quite sure now that the reason my script was hanging was that I didn't code an exit statement at the end of my BEGIN stanza.. which means that since I was running it as:
$ script .. rather than: $ script < input_file It must have been waiting for me to feed him something from the keyboard. For future reference - and even if I know zip about awk .. I strongly recommend this excellent hands-on tutorial: http://www.grymoire.com/Unix/Awk.html Takes about an hour to read, is very well-structured and clearly written .. only briefly mentions the "/pattern/ {action}" feature that other tutorials confuse you with extensively right from the start.. etc. In my particular case, it gave me enough of a "feel" for awk programming that with no forensic evidence I was able to figure out what my problem was. Thanks! CJ