Created
September 9, 2022 15:17
-
-
Save kfox/f1abf828f232c4c39919e705a4420102 to your computer and use it in GitHub Desktop.
Apply environment variables to your current shell context, useful for when you SSH into a server and need your user to operate in the same context as a service already running as that user, e.g. Celery, etc.
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
eval $(xargs -0 -L1 -a /proc/1/environ | grep -E '^[A-Z].*' | sed -e 's/=/="/' -e 's/$/"/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment