My question is very simple. I want to use environment variables in a cURL command sth similar to this:
curl -k -X POST -H \'Content-Type: application/json\' -d \
Single quotes inhibit variable substitution, so use double quotes. The inner double quotes must then be escaped.
... -d "{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}"