Rmck wrote:
>
> From: "John W. Krahn" <[EMAIL PROTECTED]>
> >
> > I would do it something like this:
> >
> > #!/usr/bin/perl
> > use warnings;
> > use strict;
> > use Socket;
> >
> > my %IPs;
> > while ( <> ) {
> > $IPs{ inet_aton( $1 ) }++ if /\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b/;
> >
22.81.97
Total IP'S = 2
Not Ip=111.111.13473
Thanks,
Rob
-Original Message-
From: "John W. Krahn" <[EMAIL PROTECTED]>
Sent: Mar 18, 2004 10:39 AM
To: [EMAIL PROTECTED]
Subject: Re: sort stdin and print
Rmck wrote:
>
> HI
Hello,
> I have a script that
Rmck wrote:
>
> HI
Hello,
> I have a script that reads stdin from the output of another script
> and cleans it up and prints it. The script gets ip's.
>
> I would like to sort it and and eliminate duplicates count the
> sorted/unique ips then print???
The best way to store unique values is to
> HI
>
> I have a script that reads stdin from the output of another script and
cleans it up and prints it. The script gets ip's.
>
> I would like to sort it and and eliminate duplicates count the
sorted/unique ips then print???
Ok then do that ;-)
>
> I thought using the perl sort comman
--Original Message-
From: rmck [ mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 12:44 PM
To: [EMAIL PROTECTED]
Subject: sort stdin and print
HI
I have a script that reads stdin from the output of another script and cleans it up
and prints it. The script gets ip's.
I would lik
rmck [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 12:44 PM
To: [EMAIL PROTECTED]
Subject:sort stdin and print
HI
I have a script that reads stdin from the output of another script and
cleans it up
HI
I have a script that reads stdin from the output of another script and cleans it up
and prints it. The script gets ip's.
I would like to sort it and and eliminate duplicates count the sorted/unique ips then
print???
I thought using the perl sort command would help but it did not... I could