Skip to content

Instantly share code, notes, and snippets.

@matsadler
Created May 22, 2013 09:47
Show Gist options
  • Save matsadler/5626445 to your computer and use it in GitHub Desktop.
Save matsadler/5626445 to your computer and use it in GitHub Desktop.
Execute a command/script with environment variables read from a .env file. Use like `setenv mycommand arg1 arg2 etc` .env file should look like: VAR1=vlaue1 VAR2=value2
#!/usr/bin/env sh
set -e
dot_env=`cat .env`
env $dot_env $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment