Article View: comp.unix.misc
Article #2019Re: Operate on two files at the same time in awk
From: Antonio Vasconcelos
Date: Sat, 09 Oct 1993 23:28
Date: Sat, 09 Oct 1993 23:28
23 lines
1971 bytes
1971 bytes
merlyn@ora.com (Randal L. Schwartz) writes:
: >>>>> In article <1993Oct6.221646.3864@bvl.pt>, vasco@bvl.pt (Antonio Vasconcelos) writes:
: But why should one use *cat* here?
:
: Antonio> cat file1 | awk '{print $1}' >x1
: Antonio> cat file2 | awk '{print $1}' >x2
:
: Sorry. You struck my "unnecessary use of cat" nerve.
: Get a clue, newbie script writers. Cat with one parameter is *rarely*
: needed. For y'all, *never* is closer, but there are a few cases where
: it might come in useful.
Sorry, sorry, sorry... You are 100% right. Awk can read from stdin,
cat is indeed an uneeded command...
I'm not exactlly a newbie script writer, I have a lot of kbytes over
my back, and a lot of uneeded cat calls too... :-(
--
| Regards, |
|-------------------------------------------------------------------|
| Antonio Vasconcelos at The Lisbon $tock Exchange - vasco@bvl.pt |
| "I DO *NOT* SPEAK FOR BVL" * NeXTmail * root@bvl.pt |
`-_________________________________________________________________-'
So Long, and Thanks for all the fish.
Technical Details
Message-ID:
<1993Oct9.232824.14623@bvl.pt>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!europa.eng.gtefsd.com!uunet!mcsun!news.inesc.pt!dec4pt.puug.pt!bvl!vascoReferences:
<MERLYN.93Oct8104613@agora.rain.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,be6d506f16d4e9f8 X-Google-Attributes: gidf8c9b,public X-Google-Thread: f72b0,be6d506f16d4e9f8 X-Google-Attributes: gidf72b0,public X-Google-Thread: 14b500,be6d506f16d4e9f8 X-Google-Attributes: gid14b500,public X-Google-ArrivalTime: 1993-10-09 21:21:59 PST Newsgroups: comp.unix.misc,comp.unix.questions,bnr.unix Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!europa.eng.gtefsd.com!uunet!mcsun!news.inesc.pt!dec4pt.puug.pt!bvl!vasco From: vasco@bvl.pt (Antonio Vasconcelos) Subject: Re: Operate on two files at the same time in awk Message-ID: <1993Oct9.232824.14623@bvl.pt> Organization: Bolsa de Valores de Lisboa X-Newsreader: Tin 1.1 PL4 References: <MERLYN.93Oct8104613@agora.rain.com> Date: Sat, 9 Oct 1993 23:28:24 GMT Lines: 23