Created
April 8, 2022 19:23
-
-
Save EricLondon/84585e1a7be2fd0697964e0ad10bcda5 to your computer and use it in GitHub Desktop.
set environment variable outside script
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/sh | |
# Usage: | |
# . ./setenv.sh | |
# | |
# echo $ENV1 | |
# blah1 | |
# | |
# echo $ENV2 | |
# blah2 | |
# | |
# env | egrep ENV | |
# ENV1=blah1 | |
# ENV2=blah2 | |
export ENV1="blah1" | |
declare -x "ENV2"="blah2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment