[RndTbl] Roundtable Digest, Vol 93, Issue 14

Michael Doob mdoob at cc.umanitoba.ca
Thu Sep 27 12:10:32 CDT 2012


On 12-09-27 12:00 PM, roundtable-request at muug.mb.ca wrote:
> Send Roundtable mailing list submissions to
> 	roundtable at muug.mb.ca
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.muug.mb.ca/mailman/listinfo/roundtable
> or, via email, send a message with subject or body 'help' to
> 	roundtable-request at muug.mb.ca
>
> You can reach the person managing the list at
> 	roundtable-owner at muug.mb.ca
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Roundtable digest..."
>
>
> Today's Topics:
>
>     1. Re: bash script for printing lines that don't match?
>        (Grigory Shamov)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 27 Sep 2012 15:13:56 +0000
> From: Grigory Shamov <Grigory.Shamov at ad.umanitoba.ca>
> To: Continuation of Round Table discussion <roundtable at muug.mb.ca>
> Subject: Re: [RndTbl] bash script for printing lines that don't match?
> Message-ID: <CC89D6B2.B1C4%Grigory.Shamov at ad.umanitoba.ca>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> Not in bash, but awk: will show what is in file1 but not in file2
>
> awk 'FNR == NR {arr[$0];next} !($1 in arr) {print}' file1 file2
>
>
> I've used this to compare lists of rpms on our machines.
>
>


Have you used diff, perhaps in conjunction with sort? If so, what didnt' work?



-- 
------------------------------------------------------------------
Michael Doob                    Telephone: (204) 474-9796
Department of Mathematics       Fax: (204) 474-7606
University of Manitoba          email: Michael_Doob at umanitoba.ca
Winnipeg, MB, Canada R3T 2N2
------------------------------------------------------------------


More information about the Roundtable mailing list