Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-unix!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) Newsgroups: comp.unix.questions Subject: Re: Using pipes within awk programs Message-ID: <20466@teknowledge-vaxc.ARPA> Date: 21 Jan 88 23:24:57 GMT References: <3521@megaron.arizona.edu> Organization: Teknowledge, Inc., Palo Alto CA Lines: 22 Posted: Thu Jan 21 15:24:57 1988 >> > who | awk '{ print $1 | "sort" }' >> > who | awk '{ print $1 }' | sort >> FYI, the two *don't* give the same results under Ultrix T2.0-1I. > Then Ultrix must be seriously broken, to not allow standard I think Ultrix awk is older than 4.3bsd's "old" awk. On Ultrix 1.2, the first form of pipe prints nothing. The second form prints a sorted list of logged in users. Ultrix 1.2's awk also has the bug where things like echo foo bar | awk '{ tmp = $1; $1 = $2; $2 = tmp; print $1, $2 }' don't work. That's how old it is. Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303