-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Alles, Kris wrote: > Hello, > > I’m trying to query a url with arguments (i.e. > http:/www.thissite.com?title=1&action=2). I get errors saying that > action is not a recognized internal or external command. I think this > is because wget uses the ‘&’ character to make the process run in the > background.
Wget doesn't do that, your shell does. Wget has no control over that. > I tried substituting %26 for the ampersand, but then my web > page doesn’t correctly process the incoming url. Right. In URLs, foo=bar&baz=quux means you have two variables, foo and baz, with the values bar and quux. But foo=bar%26baz=quux is a single variable, foo, whose value is "bar&baz=quux". > Is there a way to query urls with ampersands? Yes; quote the URL in your shell. I.e.: $ wget 'http://www.thissite.com?title=1&action=2' Note that something like $ wget http://www.thissite.com?title=1&action=2 will cause the shell to run Wget with the argument 'http://www.thissite.com?title=1', in the background; and then try to evaluate the command 'action=2'. In this specific example, there wouldn't be an error, because that's a valid way to set a shell variable; but in any case it wouldn't do what you'd want. - -- HTH, Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHL2pD7M8hyUobTrERCADQAJ0TKqq3rbFO7U2JtGFdStncvKeNMgCfbaou P7h5nZSbzVdI6d8CRNjnFAg= =NNKc -----END PGP SIGNATURE-----
