Skip to content

Instantly share code, notes, and snippets.

@vicly
Created November 30, 2017 22:27
Show Gist options
  • Select an option

  • Save vicly/703f256702f7b75488312e2b56e91897 to your computer and use it in GitHub Desktop.

Select an option

Save vicly/703f256702f7b75488312e2b56e91897 to your computer and use it in GitHub Desktop.
[Replace string using Linux command] #Shell
# OPS_PASSWORD are environment variables, need to export before running this command
# $ENV.json is a template, and OPS_PASSWORD as ${OPS_PASSWORD}
# parameters.json is the command output
envsubst '${OPS_PASSWORD},${DCS_PASSWORD},${SSM_PASSWORD},${SVOF_PASSWORD}' < $ENV.json > parameters.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment