Re: grepping distinct lines from many text files ?

2004-01-21 Thread parv
in message [EMAIL PROTECTED],
wrote Charles Swiger thusly...

 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`

Better yet...

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


...even (but do see sort(1))...


 CUCU=`sort -u /path/to/files/*`


  - Parv

-- 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


grepping distinct lines from many text files ?

2004-01-20 Thread Ion-Mihai Tetcu
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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: grepping distinct lines from many text files ?

2004-01-20 Thread Chris Pressey
On Tue, 20 Jan 2004 20:56:21 +0200
Ion-Mihai Tetcu [EMAIL PROTECTED] 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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: grepping distinct lines from many text files ?

2004-01-20 Thread Charles Swiger
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
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: grepping distinct lines from many text files ?

2004-01-20 Thread Ion-Mihai Tetcu
On Tue, 20 Jan 2004 14:02:54 -0500
Charles Swiger [EMAIL PROTECTED] wrote:

 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`

Thanks, that is what I was looking for.

I've did a apropos unique and didn't thought to do an apropos uniq :


-- 
IOnut
Unregistered ;) FreeBSD user
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]