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
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
>
>
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
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
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
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
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
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
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
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
10 matches
Mail list logo