[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] List of hosts to prepend [suggestion]
From: |
Richard Bell |
Subject: |
[Bug-wget] List of hosts to prepend [suggestion] |
Date: |
Tue, 28 Apr 2009 19:29:56 -0700 |
I don't see in the
documentation how this is possible, so I created a batch file that would allow
me to take a list of hosts or servers in a web farm so I could test the same URL
against each of them. In addition to this, I'm really just after the HTTP
status code, so it would be nice if wget had an option to just show the url used
and the status code returned. This would sorta be the oppositve behavior
of "--base=URL".
If this is
possible with the numerous switches available, please let me
know.
fetch.bat:
@echo
off
if EXIST %1 (set file=/f) else (set file=)
if not "%file%"=="" (set
eol="eol=;") else (set eol=)
echo host=%1 %file%
echo uri=%2
for %file%
%eol% %%i in (%1) do echo http://%%i%2
pause
for %file% %eol% %%i in (%1) do wget --spider http://%%i%2
(The "if"
clauses above and the vars that get set just allow me to use a single host
specified on the cmd line if it's not a filename that can be found. I'll
call this batch file with "fetch cweb.txt /images/buttons/btnleft_blue.gif"
which finds a list of hosts in cweb.txt and appends the URL to each or "fetch
cweb404 /images/buttons/btnleft_blue.gif" to hit just one host -- which, of
course, can be done with wget directly without a batch file. The batch
file shows what URLs are to be called before invoking
wget.)
Richard Bell
Manager, Network Engineering
Autobytel Inc.
18872 MacArthur Boulevard, Suite
200
Irvine, CA. 92612
email address@hidden
direct
949.225.4523
fax 949.797.0454
www.autobytel.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-wget] List of hosts to prepend [suggestion],
Richard Bell <=