I have a variable DEFAULT_SETTINGS
which is collected via curl. I need to replace a substring of this variable before writing it to a file. How can I do this?
DEFAULT_SETTINGS=$(curl -H "Authorization: Bearer $AUTH_TOKEN" https://appserver/repositories/$GITHUB_REPOSITORY_NAME/default-settings)
# [REPLACE:APPLICATION_NAME]
echo "$DEFAULT_SETTINGS" > "$GITHUB_REPOSITORY_NAME/appsettings.json"
I understand I can echo it with sed but I want to echo it to the file?