the following works for create a single user:
curl -X POST --anyauth -u admin:admin --header "Content-Type:application/json" \
-d '{"user-name":"joe",
"password": "cool",
"role": [ "rest-reader", "rest-writer" ]
}' \
http://localhost:8002/manage/v2/users
but it failed when inside a for loop to create multiple users (one at a time)
for i in john frank bob
do
curl -X POST --anyauth -u admin:admin --header "Content-Type:application/json" \
-d '{"user-name":"$i",
"password": "$i",
"role": [ "rest-reader", "rest-writer" ]
}' \
http://localhost:8002/manage/v2/users
done
where did i do wrong?