Created
November 28, 2017 09:24
-
-
Save ValentinFunk/702ede7cb4b2feb8a7de444bd28b3e53 to your computer and use it in GitHub Desktop.
Source a .env File while escaping stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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