Skip to content

Instantly share code, notes, and snippets.

@ken0x0a
Created January 6, 2019 01:52
Show Gist options
  • Save ken0x0a/5e4a9f5995bd44cfbe1fd0c64247f4f2 to your computer and use it in GitHub Desktop.
Save ken0x0a/5e4a9f5995bd44cfbe1fd0c64247f4f2 to your computer and use it in GitHub Desktop.
import .env to bash. works on mac Mojave
#! /bin/bash
# This import .env propery
eval "$(grep -v '^#' .env | sed -E 's|^(.+)=(.*)$|\1='\''\2'\''|g')"
# works on mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment