The following bash script is working completely fine:
#!/bin/bash echo '!PaSsWoRd!' | openconnect --csd-wrapper=/home/user/.cisco/csd-wrapper.sh --authenticate --user=abcde123 --authgroup="tunnel My Company" --passwd-on-stdin vpn.mycompany.com
However, I want to replace the previous input parameters with variables like that:
#!/bin/bash WRAPPER=/home/user/.cisco/csd-wrapper.sh USER=abcde123 PASSWD=!PaSsWoRd! AUTHGROUP=tunnel My Company DOMAIN=vpn.mycompany.com echo '$PASSWD' | openconnect --csd-wrapper=$WRAPPER --authenticate --user=$USER --authgroup="$AUTHGROUP" --passwd-on-stdin $DOMAIN
Unfortunately this attempt does not work anymore. I think I have to put in some quote chars or similar. Do you know what is wrong with the bash script below?