Skip to content

Instantly share code, notes, and snippets.

@wuftymerguftyguff
Last active July 11, 2017 11:17
Show Gist options
  • Save wuftymerguftyguff/9d6e0915c5faa9338d3053e4b352181a to your computer and use it in GitHub Desktop.
Save wuftymerguftyguff/9d6e0915c5faa9338d3053e4b352181a to your computer and use it in GitHub Desktop.
convert an environment in a bash format into a script in csh format used mainly for vcs sap setups
#Reformats the output of the env command into a csh friendly format
#Usage env | ./envy.sh > outfile.csh
IFS="="
while read VAR VAL
do
if [ "$VAR" != "LS_COLORS" ]
then
echo setenv $VAR $VAL
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment