Actually my JSON looks like below:
"checksum": "sdkjjfj-shbdjfj23"
I wanted to replace the checksum value with another value. As per above I used :
sed -i 's/("checksum": ")[^"]*(")/\1$checksumVal\2/g' new.json
The new.json is updated as below, but i wanted the value of that variable.
"checksum": "$checksumVal",
Expected Result:
"checksum": "newval"
Any help would be appreciated.