RE: Print the first column of a file

2003-07-30 Thread Bret Hughes
On Wed, 2003-07-30 at 14:14, Kenneth Goodwin wrote: > Depends on what the lines actually look like, check man/info > pages but you could > > Try cut -f1 filename | sort | uniq > > you need to sort it first prior to UNIQ. > or simply pipe it into sort -u use sort -un if it is numeric data of

RE: Print the first column of a file

2003-07-30 Thread Kenneth Goodwin
nesday, July 30, 2003 2:31 PM > To: [EMAIL PROTECTED] > Subject: RE: Print the first column of a file > > > Awk is something that you could you > > More $filename|awk '{print $1}'|uniq will sort through the file and > print the first column > >

RE: Print the first column of a file

2003-07-30 Thread Rigler, Steve
To: [EMAIL PROTECTED] Subject: RE: Print the first column of a file Awk is something that you could you More $filename|awk '{print $1}'|uniq will sort through the file and print the first column -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

RE: Print the first column of a file

2003-07-30 Thread Barry Johnson
PROTECTED] Subject: Re: Print the first column of a file On Tue, 29 Jul 2003, Reuben D. Budiardja wrote: > > Hello, > What command would I use to print just the first column of a file? For > example, the httpd (apache) access_log. The first column contains the IP > address. How c

Re: Print the first column of a file

2003-07-30 Thread Mark Neidorff
On Tue, 29 Jul 2003, Reuben D. Budiardja wrote: > > Hello, > What command would I use to print just the first column of a file? For > example, the httpd (apache) access_log. The first column contains the IP > address. How can I just output that, so that I can then pass it to "uniq" to > get th

RE: Print the first column of a file

2003-07-29 Thread amead
Also, 'cut' is made for this sort of thing... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 1:52 PM To: [EMAIL PROTECTED] Subject: Re: Print the first column of a file Am Dienstag, 29. Juli 2003 15:58 schrieb Jason Dixon

Re: Print the first column of a file

2003-07-29 Thread Christian Paul
Am Dienstag, 29. Juli 2003 15:58 schrieb Jason Dixon: > On Tue, 2003-07-29 at 10:07, Reuben D. Budiardja wrote: > > Hello, > > What command would I use to print just the first column of a file? For > > example, the httpd (apache) access_log. The first column contains the IP > > address. How can I j

Re: Print the first column of a file

2003-07-29 Thread Javier Gostling
On Tue, Jul 29, 2003 at 09:58:56AM -0400, Jason Dixon wrote: > $ cat /var/log/httpd/access_log | awk '{print $1}' | sort | uniq $ cut -d ' ' -f 1 /var/log/httpd/access_log | sort | uniq will get it done as well. Cheers, -- Javier Gostling D. <[EMAIL PROTECTED]> -- redhat-list mailing list un

Re: Print the first column of a file

2003-07-29 Thread Reuben D. Budiardja
On Tuesday 29 July 2003 09:58 am, Jason Dixon wrote: > On Tue, 2003-07-29 at 10:07, Reuben D. Budiardja wrote: > > Hello, > > What command would I use to print just the first column of a file? For > > example, the httpd (apache) access_log. The first column contains the IP > > address. How can I ju

Re: Print the first column of a file

2003-07-29 Thread Jason Dixon
On Tue, 2003-07-29 at 10:07, Reuben D. Budiardja wrote: > Hello, > What command would I use to print just the first column of a file? For > example, the httpd (apache) access_log. The first column contains the IP > address. How can I just output that, so that I can then pass it to "uniq" to > ge