On Sun, 6 May 2001 at 12:55am (-0600), Remo Mattei wrote:
> Hi guys it's late and my mind is not working I guess. I have 2 files one
> which is static (firewall ipdeny) the other is dynamic portsentry
> therefore I will have ips that I want to copy to the ipdeny but I do
> not want the ip if already there, any suggestions.
>
If you do..
cat list1 list2 | sort | uniq > newlist
... then newlist will contain a merge of both lists with each ip address
listed only once. Alternativly...
comm -1 -3 list1 list2 > newips
... will give you newips that contains only the ips from list2 that did not
appear in list2. This assumes that list1 and list2 have both already been
sorted - comm and uniq both only function properly on sorted lists.
M.
--
WebCentral Pty Ltd Australia's #1 Internet Web Hosting Company
Level 1, 96 Lytton Road. Network Operations - Systems Engineer
PO Box 4169, East Brisbane. phone: +61 7 3249 2500
Queensland, Australia. pgp key id: 0x900E515F
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list