Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!zephyr!tektronix!psueea!parsely!agora!merlyn From: merlyn@agora.UUCP (Randal L. Schwartz) Newsgroups: comp.unix.questions Subject: Re: Lower->Upper in AWK (was: Re: cascading pipes in awk) Summary: get Perl! Message-ID: <1496@agora.UUCP> Date: 28 May 89 21:47:10 GMT References: <818@manta.NOSC.MIL> <13921@lanl.gov> Reply-To: merlyn@.UUCP (Randal L. Schwartz) Distribution: usa Organization: Organization? You've got to be kidding! Lines: 32 In article <13921@lanl.gov> dph@lanl.gov (David Huelsbeck) writes: | From article <818@manta.NOSC.MIL>, by psm@manta.NOSC.MIL (Scot Mcintosh): | > | > Unfortunately, I only want to uppercase a few selected portions of the | > text my awk program is reading (my original posting contained a | > very simplified example, so this wasn't obvious). There just doesn't | > seem to be a way to have a filter program in the middle of two groups | > of awk statements. | | I afraid your right. Perhaps nawk or gawk would help you but I | really don't know enough about either one to say. However, you | can, somewhat painfully, translate lower to upper or rot13 or | whatever in plain old awk. | | Here is my solution to this problem along with a summary of solutions | I recieved from other awkers when I posted asking for a better way. | Sorry for the length but I felt that every different solution showed | a unique and interesting approach that might be useful in solving other | sorts of problems in awk. [solution deleted] Just get Perl. It is great for this, and best of all, it's free! For example, to make variable "$foo" uppercase: $foo =~ tr/a-z/A-Z/; Just another Perl hacker (thanks Larry!)... -- Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 quality software, documentation, and training at affordable rates ...!uunet!agora.hf.intel.com!merlyn