Skip to content

Instantly share code, notes, and snippets.

@Darkflib
Created May 17, 2024 18:36
Show Gist options
  • Save Darkflib/1a8421dc561ea4fbf07108cc132cb4bf to your computer and use it in GitHub Desktop.
Save Darkflib/1a8421dc561ea4fbf07108cc132cb4bf to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Run as `source load_env.sh`
#
# Load .env variables into the current shell environment
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment