I also have to replace "--no-cookies" with "--cookies=off", in order for wget to even attempt obeying me. So I started bash by my usual means and entered the command manually in this form:
But this gave just the same result as earlier. The bash window shows some text like the following:Code:wget -O list.txt --header="Accept:" --cookies=off --no-http-keep-alive --user-agent="PS2NET Client" http://www.cmgsccc.com/ps2/day1/cb.php?date="2005-10-25"
There is some more too, but that just shows how the error page found above is downloaded and saved to "list.txt". The only thing a little odd here is that the url displayed in the topmost wget response does not have the quote marks around the date, even when I did enter these manually. The response shown above is identical, regardless of whether I enter those quotes in the command or not...Code:--11:38:11-- http://www.cmgsccc.com/ps2/day1/cb.php?date=2005-10-25 => `list.txt´ Resolving www.cmgsccc.com... 70.86.92.227 Connecting to www.cmgsccc.com[70.86.92.227]:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://www.cmgsccc.com/notfound.php [following] --11:38:11-- http://www.cmgsccc.com/notfound.php => `list.txt´ Connecting to www.cmgsccc.com[70.86.92.227]:80... connected. HTTP request sent, awaiting response... 200 OK
Probably, but if so there's not much I can do about it...It's either bash version that behaves a liitle bit different than mine or wget.
The odd part is that the responses are identical regardless of whether I try to use quote marks or not. It's almost as if they were filtered out by bash before even passing the arguments to wget.Anyway, if that will work, just replace the date in the script (or try to remove the " around the date...
I'm not sure what you mean by that, or how it could help.eventually use eval or direct command calling).
If bash+wget can't do the job with commands and arguments entered manually, I see little point in trying more complex methods of generating the command line.
Mine are:My bash on cygwin is: GNU bash, version 3.00.16(14)-release (i686-pc-cygwin)
My wget on cygwin is: GNU Wget 1.10.2
GNU bash, version 2.05b.0(1)-release (i686.pc-cygwin)
GNU Wget 1.9.1
And mine is:sed shouldn't play any tricks at this stage (it can, but only once a proper list is downloaded). But my sed is:
GNU sed wersja 4.1.4
GNU sed version 4.1.3
As you see all my Cygwin components are a bit older than yours, as a result of me having to reinstall Cygwin not so long ago. Since the new Cygwin installers are totally incompatible with PS2Dev stuff, I had to search a long while to find an installer old enough to do that job properly. But unfortunately it was a little older than I really wanted it to be, resulting in some incompatibilities with more modern methods (like needing "--cookies=off" instead of "--no-cookies" etc).
I'm no bashing expert either. All I've done with it is what I've had to do in order to make all the PS2Dev stuff work properly.PS. I'm not really that much familiar with bash scripting, so this script isn't most likely optimal, nor bugfree. Usually all I need are simple scripts like this one, and I just make them to work.
Best regards: dlanor


LinkBack URL
About LinkBacks
.







, but not very realistic.