Hi, I'm trying to write a bash script in which I connect to a samba server, by getting the username and password, then saying $username:$password@SERVERNAME.
However, this will fail if the password has an @ in it. Is there a way to escape the @ out of the password in bash?
Thanks in advance
Update: I'm setting up this network printer
lpadmin -p PRINTER -v smb://$username:$password@SERVER -E
and it works except in the case that $password has an @ sign in it; the $username and $passwords variables are gotten from reading stdin