Last active
December 24, 2015 16:08
-
-
Save feth/6825333 to your computer and use it in GitHub Desktop.
source tcsh environment variables
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
# bash script to be sourced | |
source_tcsh() { | |
tchsh_file=$1 | |
TCSH_ENV=`tcsh -c "source ${tchsh_file} ; printenv"` | |
NEW_ENV=`echo -e "$TCSH_ENV" | sed -e 's/=/=\"/' -e 's/$/\"/' -e '/^PROFILEREAD=.*$/d'` | |
eval "$NEW_ENV" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using this to convert infra from tcsh to bash