[REBOL] Re: .log to .csv conversion
From: tomc:darkwing:uoregon at: 15-Mar-2001 21:59
I would keep it simpler
this is not tested but something like would work
given a file dns-cache.save with format
0.0.0.0 sub.domain.dom
1.0.0.0 sub.domain.dom1
2.0.0.0 sub.domain.dom2
...
dns-cache: parse %dns-cache.save none
foreach ip log [
either none? domain-address: select dns-cache ip
[append dns-cache ip
append dns-cache either none? domain-address: read join dns:// ip
[domain-address: ip]
[domain-address]
]
[domain-address]
use yer domain-address
]
at the end to save I would probably just clobber the old dns-cache file
buffer copy ""
foreach [a b] dns-cache [append buffer rejoin [a "^-" b "^/"]]
write %dns-cache.save buffer
On Thu, 15 Mar 2001 [ryan--christiansen--intellisol--com] wrote: