Skip to content

Instantly share code, notes, and snippets.

@csmosx
Created June 13, 2017 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csmosx/d03846ca0189226454e187eb6a10cb68 to your computer and use it in GitHub Desktop.
Save csmosx/d03846ca0189226454e187eb6a10cb68 to your computer and use it in GitHub Desktop.
bash dotenv
#!/bin/bash
# dotenv - run a program in an environment with added vars parsed from a .env file
env $(if [ -f .env ]; then cat .env | grep -v ^# | xargs; fi) $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment