Update
I tried something like this in my bash script but I cannot make it work as I am confuse on few things. How can I replace my template json file for each clientId and then post that json to the server using curl -
while IFS= read -r line; do # this below line isn't working cat temp.txt | sed 's/clientId:[^ ]*clientId:$line/' # and how should I use new json to post curl done < clientIds.txt