ATTN: AWK GURUS!!! (lower to upper conversion)

Stefek Zaba sjmz at otter.hple.hp.com
Wed Mar 23 00:54:46 AEST 1988


Make no apology!  Your lookup table is a perfectly neat solution given the
wierd constraints you've acquired.  Personally I'd even avoid the "if lc-alpha"
test, and construct a table with the full 128 (sorry, non-USASCII users!)
characters, using an awk FOR with printf %c, and then overwrite the 26 elements
of interest.  This avoids the "if" in your inner loop (though maybe awk table
lookup is slow enough to make the "if" test a win in efficiency, if not
clarity.)

Keep at it - awk's clearly Turing-complete!  (**Please**, no TM's-in-awk!!!)



More information about the Comp.unix.wizards mailing list