Linux – ftp: special characters in password

ftplinuxspecial characters

I need to execute this command

wget -r ftp://$USER:$PASSWORD@$SITE/

But first since there were some special characters (such as '!?') within the PASSWORD I had some problems that I solved by escaping them with '\'..

Now I am facing the problem that special character don't work with the ftp command…(here)

At the moment I get this:

Bad port number

This is because also some numbers are present within the PASSWORD, I tried to single-quote, but without success..

How can I solve, if I would not change the password?

On terminal, on Debian.

Best Answer

Use the --ftp-user and --ftp-password parameters instead of encoding it into the URL

Related Question