grepping distinct lines from many text files ?

Charles Swiger cswiger at mac.com
Tue Jan 20 11:03:01 PST 2004


On Jan 20, 2004, at 1:56 PM, Ion-Mihai Tetcu wrote:
>
> CUCU=`cat /path/do/dir/* | some_filer_program`
>
> and have in $CUCU the distinct lines from all the files.

Try:

CUCU=`cat /path/to/files/* | sort | uniq`

-- 
-Chuck



More information about the freebsd-questions mailing list