Get and use a password with special characters in Bash shell
I'm getting some troubles to use a password with special characters such as $ in a bash shell script. My shell script is : read -s -p "Password : " bindDNPass ldapadd -H ldap://localhost -x -w $bindDNPass -D "dn=cn=Admin" -f /tmp/file.ldif And the password could be something like $Something18$. Well, the command ldapadd -H ldap://localhost -x -W -D "dn=cn=Admin" -f /tmp/file.ldif` asks for my $Something18$ , and works fine. But if I try ldapadd -H ldap://localhost -x -w $Something18$ -D "dn=cn=Admin" -f /tmp/file.ldif it doesn't work. I guess it's trying to resolve the variable $Something18,