System "wget"command

Fairlight fairlite at fairlite.com
Wed May 16 09:40:43 PDT 2007


Yo, homey, in case you don' be listenin', Mike Schwartz done said:
> 
>      I've also never played with the filePro "user" command.  That actually
> may be more efficient, especially on other code (NOT RELATED TO THIS
> PROBLEM), such as a nightly report posting process that I'm running, which
> may generate 100 or more "system wget" commands in a row. 

I fail to see how, unless wget takes URL after URL on STDIN, and gives you
some indication on STDOUT that that particular retrieval is done, which you
can actually do with "-i -" but a quick test with just two URLs shows that
1) parsing the feedback from wget is going to be ugly, and 2) I tried it on
the root of two web sites...mine and Yahoo; it created index.html and
index.html.1 respectively.  There's no facility for coordinating URLs to be
retrieved with output filenames, from what I'm seeing.  You can use "-O -"
with it ("-i - -O -") but you have to supply all your URLs up front, and
all the outputs are sent back with really half-baked display updates
inbetween the file contents.  You can't rely on "100%" (just had one fail
to print that, you can't necessarily rely on "--", you can't rely on
"saved" unless you know it will never be in the body of any of the files
coming in.  It's just ugly.  It also, by virtue of having to supply
everything up front and get everything back at once, totally misses being
in the target market for USER.

USER is meant to be a two-way pipe between fP and the child process.  The
only advantage it has over SYSTEM is that you can interact with it on the
child's STDIN/STDOUT streams.

So unless you could basically issue a URL, read all lines until a certain
marker was found, then issue another, read all till marker, rinse, repeat
infinitely, USER is of no real use compared to SYSTEM as far as wget is
concerned.  Anything you can do with "-i - -O -" is just as well done
with SYSTEM, and in fact if you want that kind of output, it's easier to
get, generates one long stream you still have to parse, but doesn't have
any of the limitations USER has (I seem to recall Bob Stockler saying
something several times about command assembly, but don't remember the
exact prohibition--you can check the archives).  With SYSTEM, you'd just
use real files rather than STDIN/STDOUT, but it would be a bit easier to
handle.

I think you're barking up the wrong tree on that, Mike.  Just my opinion,
but I did just run through the man page and some tests.

mark->
-- 
No matter what your problems, modern medicine can help!
http://members.iglou.com/fairlite/fixital/


More information about the Filepro-list mailing list