line continuation when using docker exec bash with double quotes
0
I want to be able to pass variables inside the `docker exec bash -c " " which also include line continuation character. Consider below command which works with line continuation but without variables inside the bash command docker exec -t $hostname bash -c 'authconfig --enableldap --enableldapauth --ldapserver="myldap.docker.com" --ldapbasedn="dc=docker,dc=com" --enablesssd --enablesssdauth --enableldaptls --enablemkhomedir --disablecache --disablecachecreds --update' If i want to pass variables inside the bash e.g. --ldapserver='$ldaphost' --ldapbasedn='dc=$domain,dc=com' and i need to replace single quotes ' by double quotes " and also remove the line continuation '' ,otherwise it doesn't work. docker exec -t $hostname bash -c ...