I found the value of a response (curl) with sed and now i need some help to take the value that i printed in a file and to use it in another substring in the same .sh script
This is the response of the server:
{"status":{"code":"STATUS_OK","message":"ServiceUUID sent successfully via..."},"body":{"data":{"userApps":{},"username":"HereTheUsername","fullName":"NameOfTheAccountPossessor","lang":"sq","blocked":false,"lastLogin":"2016-10-10T17:19:22","passwordResetUuid":"6147dc32-b72e-450a-8084-2fdb5319a931","userAccessLevel":5,"countDownSeconds":0,"serviceUuid":"7260276c-5c3f-41d3-9329-3603acecb7e5","userAttributes":{},"labelMap":{},"id":"APPUSER00000012","someLabel":"NameOfTheOrganisation"}}}
So i finded the value "serviceUuid":
fuid=$(echo "$uuid" | sed -nE 's/.*"serviceUuid":"(.*)","user.*/\1/p' >> final.txt)
Now i want to take this value(in file final.txt) and to paste it on this string in the same file of the script called aass.sh:
login=$(curl -X POST -H "ACCEPT-LANGUAGE:en" -H "Content-Type: application/json;charset=utf-8" -H "Accept-Encoding:gzip" -H "Accept: application/json" -d {"serviceUuid":"**HERE**"} UrlOfTheSite)
How i can do?