Re: sort stdin and print

2004-03-18 Thread John W. Krahn
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/; > >

Re: sort stdin and print

2004-03-18 Thread rmck
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

Re: sort stdin and print

2004-03-18 Thread John W. Krahn
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

Re: sort stdin and print

2004-03-18 Thread Wiggins d Anconia
> 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

RE: sort stdin and print

2004-03-18 Thread Jayakumar Rajagopal
--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

RE: sort stdin and print

2004-03-18 Thread Ned Cunningham
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

sort stdin and print

2004-03-18 Thread rmck
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