env.d and tcsh

Kacper Kornet kornet at camk.edu.pl
Thu Oct 14 17:48:14 CEST 2004


Hi!

Setting of variables from env.d does not work when tcsh is a login shell. In
csh.login is even a comment:

# FIXME: how to retrieve something like $$NAME ??
# This is not working

So I have a suggestion to do it that way:

#v+
--- csh.login.orig	2004-06-24 10:13:17.000000000 +0200
+++ csh.login	2004-10-14 15:57:22.000000000 +0200
@@ -35,11 +35,12 @@
 		grep -v "^#" $i | head -n 1 > /dev/null
 		if ($status == 0) then
 			set backslash_quote
-			set j = `grep -v "^#" $i |head -n 1`
-			eval set "$j"
+			set j = `grep -v "^#" $i |head -n 1|cut -s -d= -f1,2 --output-delimiter=' '`
+	                echo "$j"
+			eval setenv "$j"
 			# FIXME: how to retrieve something like $$NAME ??
 			# This is not working
-			setenv $NAME "$NAME"
+#			setenv $NAME "$NAME"
 		endif
 		breaksw
 	endsw
#v-


-- 
  Kacper Kornet




More information about the pld-devel-en mailing list