
I dont know perl, but I have done programming in the past and I have a few ideas that might help point your mind to a new train of thought. Using a basic sorting script (suitably altered to take account of the numeric data (e.g. sorted by number or ASCII code). Once the list is ordered, run the data through another loop that takes each piece of data (one subnet at a time) and compares it with the previous piece of data and if they are the same - remove one of the entries. Hope this helps. Nick

On Mon, 22 Nov 2004 19:45, async wrote:
Once the list is ordered, run the data through another loop that takes each piece of data (one subnet at a time) and compares it with the previous piece of data and if they are the same - remove one of the entries.
man uniq Wayne

Wayne Rooney wrote:
On Mon, 22 Nov 2004 19:45, async wrote:
Once the list is ordered, run the data through another loop that takes each piece of data (one subnet at a time) and compares it with the previous piece of data and if they are the same - remove one of the entries.
man uniq
Example; (from metanet, not the real world) 10.0.0.0/8 10.1.0.0/16 10.2.0.0/16 10.10.0.0/16 10.192.0.0/16 uniq or sort -u wouldn't detect any of these but the first entry covers all the other subnets, the second two could have been joined into a /15, etc. It's a little more complicated than just removing exact duplicates. There are probably already tools to do this automatically, I'd check sourceforge or ask the ape/wix people on nznog...
participants (3)
-
async
-
Wayne Rooney
-
zcat