Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!deimos.cis.ksu.edu!ksuvax1.cis.ksu.edu!hager From: hager@ksuvax1.cis.ksu.edu (Donald E. Hager) Newsgroups: comp.unix.questions Subject: Re: cascading pipes in awk Keywords: awk Message-ID: <1962@deimos.cis.ksu.edu> Date: 23 May 89 20:07:23 GMT References: <813@manta.NOSC.MIL> Sender: news@deimos.cis.ksu.edu Reply-To: hager@ksuvax1.cis.ksu.edu (Donald E. Hager) Distribution: usa Organization: Kansas State University, Dept of Computing & Information Sciences Lines: 26 In article <813@manta.NOSC.MIL> psm@manta.nosc.mil.UUCP (Scot Mcintosh) writes: >Is there a way to cascade pipes in awk? I'm trying to do something >like the following: > { print | "tr [a-z] [A-Z]" | < now-upper-case text >> > } > >Any other suggestions to accomplish the same thing would be >appreciated. I've been reading this newsgroup for quite some time now, but I've never posted before. Here we go... In reference to your <> inside the awk program, I am assuming that you are talking about more awk statements. The problem is that only one output statement to a pipe is permitted in an awk program. The solution that I see is to pipe your translated text into an awk program: cat filename | tr [a-z] [A-Z] | awk '<>' I hope this helps! -- Donald Hager | // // ===== // // KSU Dept. of Computing & Information Sciences | // // //___ // // Internet: hager@ksuvax1.cis.ksu.edu | //=<< // // // UUCP: ...!{rutgers,texbell}!ksuvax1!hager | // // ===== ======