Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2004 11:06:44 -0800
From:      Chris Pressey <cpressey@catseye.mine.nu>
To:        Ion-Mihai Tetcu <itetcu@apropo.ro>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: grepping distinct lines from many text files ?
Message-ID:  <20040120110644.688e77bb.cpressey@catseye.mine.nu>
In-Reply-To: <20040120205621.05fc84da@it.buh.cameradicommercio.ro>
References:  <20040120205621.05fc84da@it.buh.cameradicommercio.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Jan 2004 20:56:21 +0200
Ion-Mihai Tetcu <itetcu@apropo.ro> wrote:

> Hi,
> 
> 
> I know I have done this before, but I don't remember how ;)
> 
> I have a collection of text files in one directory, and each file can
> contain one or more lines of text, of which any of them could also be in
> another file and what I want is to do something like:
> 
> CUCU=`cat /path/do/dir/* | some_filer_program`
> 
> and have in $CUCU the distinct lines from all the files.
> 
> Something like SQL's SELECT DISTINCT FROM ....
> 
> Any pointers ?

man 1 uniq
?

-Chris



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