Last active
July 20, 2023 23:25
-
-
Save mattak/5d532e5d78d311a3c75ac56f948bbebd to your computer and use it in GitHub Desktop.
import-env
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
#!/bin/bash | |
for kv in $(< $1) | |
do | |
if [[ "$kv" = ^\s*$ ]] || [[ "$kv" =~ ^# ]]; then | |
continue | |
fi | |
export $kv | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install
Usage
.env
your_script.bash