Skip to content

Instantly share code, notes, and snippets.

@ValentinFunk
Created November 28, 2017 09:24
Show Gist options
  • Save ValentinFunk/702ede7cb4b2feb8a7de444bd28b3e53 to your computer and use it in GitHub Desktop.
Save ValentinFunk/702ede7cb4b2feb8a7de444bd28b3e53 to your computer and use it in GitHub Desktop.
Source a .env File while escaping stuff
sed -E -n 's/[^#]+/export &/ p' .env | while read line ; do echo $(printf %q "$line") | eval ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment