Execute command with multiple layers of quoting via ssh – Nginx
I want to execute a docker command on a remote server. The problem is I don't know to escape multiple quotes. ret=$(ssh root@server "docker exec nginx bash -c 'cat /etc/nginx/nginx.conf | grep 'ServerName' | cut -d '|' -f1'") I get…