Created
March 17, 2018 00:08
-
-
Save s1113950/039b52c35337b377239bc1f7f37724c5 to your computer and use it in GitHub Desktop.
Exports environment variables to root; useful in patching kubernetes deployment with ssh
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 | |
OLDIFS=$IFS | |
IFS=$'\n' | |
for each in `printenv`; do | |
echo "export "\'$each\' >> /root/.bashrc | |
done | |
IFS=$OLDIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment