I'm a big fan of wget. It saves me a lot of time when moving clients to a new server. Today, I encountered something I never dealt with before. The ftp user had a "@" symbol within it. This posed a problem because wget's ftp user/pass syntax is of the following form:
wget ftp://user:pass@domain.com:port/directory
When I inserted the user like this:
wget ftp://user@ftpsite.com:pass@domain.com/directory
It stopped at the first '@' symbol and said something like "Host ftpsite.com:pass@domain.com not found"
I tried escaping the @ symbol like this:
wget ftp://user\@ftpsite.com:pass@domain.com
It didn't work either.
Next I tried using alternate symbols, like:
wget ftp://user%ftpsite.com:pass@domain.com
wget ftp://user.ftpsite.com:pass@domain.com
Those didn't fare any better.
Finally, I tried URL encoding the @ using %40
wget ftp://user%40ftpsite.com:pass@domain.com
That did the trick. After a little digging, I found confirmation of this trick at the
following article. You need to encode '@' as '%40', ':' as '%3A' and '/' as '%2F'.
Posted under the influence of [[NOFX :: Cheese/Where's My Slice]]