Article View: comp.unix.misc
Article #2012Re: Operate on two files at the same time in awk
From: Brian Larmour
Date: Fri, 01 Oct 1993 15:48
Date: Fri, 01 Oct 1993 15:48
26 lines
1559 bytes
1559 bytes
In article <1993Sep30.171928.6462@bmerh85.bnr.ca>, Vilok Kusumakar <vilok@bnr.ca> wrote: >I have a problem for awk experts: > >I have two text files file1 and file2. > >I want to look for presence of string at $1(1st column) in file1 in >file2. And print out all the lines in file1 whose $1 is not present >in any line in file2. > Have you tried using the "join command". "man join" should help. To achieve the above, type: join -v 1 file1 file2 Malur -- Malur A. Narayan Senior Information Developer Transmission Information and Learning Products Bell-Northern Research Ltd., Ottawa, Canada mnarayan@bnr.ca
Technical Details
Message-ID:
<1993Oct1.154830.29504@bmerh85.bnr.ca>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!udel!gatech!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!cs.utexas.edu!uunet!pipex!bnr.co.uk!corpgate!nmerh207!bmerh85!bmerha67!mnarayanReferences:
<1993Sep30.171928.6462@bmerh85.bnr.ca>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-01 09:48:32 PST Newsgroups: comp.unix.misc,comp.unix.questions,bnr.unix Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!udel!gatech!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!cs.utexas.edu!uunet!pipex!bnr.co.uk!corpgate!nmerh207!bmerh85!bmerha67!mnarayan From: mnarayan@bmerha67.bnr.ca (Brian Larmour) Subject: Re: Operate on two files at the same time in awk Message-ID: <1993Oct1.154830.29504@bmerh85.bnr.ca> Sender: news@bmerh85.bnr.ca (Usenet News) Organization: Bell-Northern Research References: <1993Sep30.171928.6462@bmerh85.bnr.ca> Date: Fri, 1 Oct 93 15:48:30 GMT Lines: 26