Escape a ! in the password parameter of wget

Posted by Dave on Server Fault See other posts from Server Fault or by Dave
Published on 2010-06-11T00:32:03Z Indexed on 2010/06/11 0:43 UTC
Read the original article Hit count: 267

Filed under:
|

I'm trying to execute something like this:

wget --user=foo --password=bar! url

The ! in the password is causing problems. I've tried escaping it with \, as in

--password=bar\!

I've tried encapsulating in single and double quotes. I put the password in a separate file and tried

--password=cat pass.txt

Each time, I get a 403 Forbidden. Using -d, I see that the SSL handshake is successful. On the Windows command line, the command works. My assumption is that I need to escape the ! differently, but I don't know how else.

© Server Fault or respective owner

Related posts about bash

Related posts about wget