Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Newbie needs some guidance...

 [1/2] from: kpeters:mvinc at: 23-Dec-2003 15:42


Hi All ~ am still a bloody newbie and want to do the following (on a Redhat box, downloaded latest core today): I have a file containing a list of ftp URLs in the format: ftp://<userid>:<password>@hostname I want to iterate through this list and call wget for each entry like this: wget <some parameters> -P <userid> -P specifies the directory to save the retrieved tree under. Would a true Reboler even use wget or do everything in Rebol and if so, how? TIA, Kai

 [2/2] from: tim::johnsons-web::com at: 23-Dec-2003 18:17


* Kai Peters <[kpeters--mvinc--net]> [031223 15:00]:
> Hi All ~ > am still a bloody newbie and
<<quoted lines omitted: 5>>
> -P specifies the directory to save the retrieved tree under. > Would a true Reboler even use wget or do everything in Rebol and if so, how?
Hi Kai: My disclaimer is that I am using rebol/core on Red Hat. /core does not do system calls, so you would not be able to exploit wget. Since you are new to rebol, I suggest starting by reading from a file, and iterating through each line. The code below reads each line in a file called "Map.r" (using the /core console) comments follow semicolon
>>lines: read/lines %Map.r ; read lines into a block >>foreach line lines[print line] ; read each line
;; Got that so far. Now, each line is a string. ;; review each line to accertain that is is indeed ;; the same as a rebol ftp scheme. From what you ;; describe above, that may be the case, if so you won't ;; have to do any munging. ;; Just to get the hang of it, now try this:
>>lines: read/lines %Map.r ; read lines into a block >>read to-url first lines ; let's try the first one
; and see if you don't ; get an error message. ;; Let us know how that goes so far. ;; Not having system calls can be a pain, I know, but ;; it is so easy to transfer files from one ftp ;; site to another. HTH tim -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted