3 ms·
The issue is probably related to quotations among other shell related things. Observe: NAME=taterman EMAIL=sweettaterhater@taterman.com curl --jp "
by mkdirp 5y ago
The issue is probably related to quotations among other shell related things. Observe:
NAME=taterman
EMAIL=sweettaterhater@taterman.com
curl --jp "user=$NAME" --jp "email=$EMAIL" http://getdemtaters.com
vs
curl -d "{\"user:\"$NAME\",\"email\":\"$EMAIL\"}" http://getdemtaters.com
Even adding jq to requirements doesn't make it that much better:
jq -n --arg name "$NAME" --arg email "$EMAIL" '{ "user": $name, "email": $email }' | curl -d @-
- overtomanu 5y agoit might be easier if you use heredoc