Skip to content

Instantly share code, notes, and snippets.

@feth
Last active December 24, 2015 16:08
Show Gist options
  • Save feth/6825333 to your computer and use it in GitHub Desktop.
Save feth/6825333 to your computer and use it in GitHub Desktop.
source tcsh environment variables
# 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"
}
@feth
Copy link
Author

feth commented Oct 4, 2013

using this to convert infra from tcsh to bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment