grepping distinct lines from many text files ?

Ion-Mihai Tetcu itetcu at apropo.ro
Tue Jan 20 10:54:58 PST 2004


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 ?


Tnx,

-- 
IOnut
Unregistered ;) FreeBSD user


More information about the freebsd-questions mailing list