I have an EC2 instance with Tomcat instance running and the credential to connect the tomcat instance is stored in the aws secret manager. Now when i read the password from secret manager i get the correct output
aws secretsmanager get-secret-value --secret-id tomcat_creds --query SecretString --output text | cut -d: -f3 | tr -d \"\}
Output : !c$674
But when i input the above output as a password for my tomcat url using curl, it is failing due to the characters ! $ .
curl -s -u ${USER}:${PASS} ${URL}
Now i am trying to convert the received output from !c$674
to /!c/$674
before providing as an input to curl command.
is there any way we can convert the above in shell scripts. I am new to shell scripts.