Skip to content

Instantly share code, notes, and snippets.

@wbingli
Created July 16, 2014 23:32
Show Gist options
  • Save wbingli/319bd1ba98be762ada34 to your computer and use it in GitHub Desktop.
Save wbingli/319bd1ba98be762ada34 to your computer and use it in GitHub Desktop.
Replace ${} placeholder with environment values
perl -p -i -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment