Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Feb 2003 23:22:36 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Doug Poland <doug@polands.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: text processing, excluding common lines
Message-ID:  <20030209052236.GE5356@dan.emsphone.com>
In-Reply-To: <20030209050856.GA55816@babylon.polands.org>
References:  <20030209050856.GA55816@babylon.polands.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 08), Doug Poland said:
> Hi,
> 
> Anyone know a command-line tool (or tools piped together) that
> could achieve the following results.  Given...
> 
> % cat fileA
>   line1
>   line2
>   line3
> 
> % cat fileB
>   line2
>   line4
>   line5
> 
> % cat fileC
>   line1
>   line4
>   line6
>   line7
> 
> I would like to see all the lines in fileC that are not in fileA or
> fileB.  In my case, I may be seraching against many files, i.e., 
> (A,B,C,etc...)
> 
> So my desired result would be:
> 
>   line6
>   line7

cat fileA fileB | sort | comm -13 - fileC

-- 
	Dan Nelson
	dnelson@allantgroup.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030209052236.GE5356>