I am trying to store password in a shell variable. Once this step is done, I need to use this password in a curl command.
logmetPassword=$(echo "XXXXXXXXXXXXX==" | openssl enc -base64 -d | openssl enc -des3 -k mysalt -d)
curl -k -XPOST -d '[email protected]&passwd=$logmetPassword&space=myspace&organization=muOrg' https://mywebsite/login
The problem is, it takes $logmetPassword as it is witout substituting the value.
I've tried many options:
curl -k -XPOST -d '[email protected]&passwd=${logmetPassword}& space=myspace&organization=muOrg' https://mywebsite/login
curl -k -XPOST -d '[email protected]&passwd="{$logmetPassword}"&space=myspace&organization=muOrg' https://mywebsite/login
curl -k -XPOST -d '[email protected]&passwd=\"{$logmetPassword}\"&space=myspace&organization=muOrg' https://mywebsite/log
Any suggestions?