At 11:07 04/02/00 +0000, you wrote:
>I've been asked to take a text file containing 1,500 IP Addresses and find 
>an URL for each address, and write it to a new text file containing IP 
>Address & URL.  Is there any way I can do this in REBOL?  If so I'd 
>appreciate any guidance the REBOL gods may be willing offer.
>
>While I'm begging help; can REBOL be used to telnet to a site?  If yes I 
>would again ask for any guideance that the REBOL gods might be willing to 
>impart.
>
>Thanks for any assistance;

Just did this a few days back. Make sure to change the path to where you
want to save the result file.

REBOL [
    Title: "dns TOOL"
                Author: "Richard Barry Jones"
    Date:  24-January-2000
    File:  %todns.r
    Purpose: {
        To convert IP addresses - stores result in a file.
    }
]

dns-list: read/lines %/c/view/dns.txt ;change this to relevant file.

dns-file: []

foreach dns-entry dns-list [
        address: to-string probe read to-url join "dns://" dns-entry
        to-write: join dns-entry [" = " address newline]
        print to-write
        append dns-file to-write
        to-write: ""
]

write %/c/view/dns-results.txt dns-file ; change this to relevant output file.


Notice any mistakes ? If so, let me know - Im still new at REBOL. Works
fine for me.

Barry Jones

-------
The Random Groucho Marx Quotes Page
http://www.therightside.demon.co.uk/quotes/groucho/

Reply via email to