From owner-freebsd-questions@FreeBSD.ORG Sat May 7 02:58:41 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75BA8106564A for ; Sat, 7 May 2011 02:58:41 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2F1468FC08 for ; Sat, 7 May 2011 02:58:40 +0000 (UTC) Received: by vxc34 with SMTP id 34so5455430vxc.13 for ; Fri, 06 May 2011 19:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=NbQa1kF6f/tILe/45jAlVe4wnMScUfJGT08UH+gBJW4=; b=bOEWcSnEwjSXa8kGN7lqWirCUx2ZDI+1TqKiQ+Xte/6qwP/UJXpXSXfj6FXYMywoh4 LvoQdV3NXvkTZXBe5EDpKJTRd0zTzaTodrAZIMEY7aB+n3T60E6lfj45iYcdSCSwq2RG OQN2H7ejb2U2cz0jBUrsLywaxYpyL9O9gdkUs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=CEQe+2SCDlEo2S45t78SIR0Xu4LM0TATU9+hJKrkKXNtLoQ/LKUxLTipW4LnKO0WiB UgLnkCP4cw1kW00GOY3gk9P++6zmYTYOfBbGQCemyM5C4YXN76O0prMZ7qjtIowiylcV 3+luIvTyhQI5EKVlU3sLeAFRHTZh0YErdLlB4= Received: by 10.52.76.10 with SMTP id g10mr2228280vdw.252.1304735700154; Fri, 06 May 2011 19:35:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.182.232 with HTTP; Fri, 6 May 2011 19:34:28 -0700 (PDT) In-Reply-To: <4DC48DB6.8030907@lazlarlyricon.com> References: <4DC48DB6.8030907@lazlarlyricon.com> From: Eitan Adler Date: Fri, 6 May 2011 22:34:28 -0400 Message-ID: To: Rolf Nielsen Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Subject: Re: Comparing two lists X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:58:41 -0000 .... > They have some lines in common > and some lines are unique to one of the files. Use comm whenever you are dealing with set operations (in your case the intersection operation): http://www.catonmat.net/blog/set-operations-in-unix-shell -- Eitan Adler