Below is the JSON file:
{
"awsIAMCred" : "replaceme",
"DatabaseName" : "replaceme"
}
Below is the bash file:
#!/bin/bash
echo BEGIN
date '+%Y-%m-%d %H:%M:%S'
TOKEN=mouse
touch connector.json
yum -y install moreutils
yum -y install nano
yum -y install nc
echo install of nano,nc and moreutils are done
chmod 660 connector.json
jq '.awsIAMCred = "hello"' connector.json|sponge connector.json
jq '.DatabaseName = $TOKEN' connector.json|sponge connector.json
cat connector.json
I am getting this exception:
jq: error: TOKEN/0 is not defined at , line 1:
Please help.