Re: [NTLK] [OT] Unix gurus: help!

From: David Arnold (arnold_at_dstc.monash.edu.au)
Date: Thu Aug 21 2003 - 06:55:37 PDT


-->"Nicolas" == Nicolas Zinovieff <krugazor_at_free.fr> writes:

  Nicolas> I don't know if I am a guru, but it looks like the setenv
  Nicolas> command only applies to the current tcsh environment.

right. environment variables are inherited (copied on creation) by
child processes. your interactive shell is parent to the new instance
of tcsh running your script, but the parent does not see the settings
made within the script.

  Nicolas> When you launch the script, in fact you are calling a /second/
  Nicolas> tcsh. Therefore your variables are forgotten once you pop
  Nicolas> out of the tcsh stack.

yup.

  Nicolas> IIRC you should use "source whatever.tcsh" if you want to
  Nicolas> act through the current tcsh session.

right again. the "source" command causes the statements in the
specified file to be executed by the current shell instance, not a new
instance.

d

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html
Official Newton FAQ: http://www.chuma.org/newton/faq/


This archive was generated by hypermail 2.1.5 : Thu Aug 21 2003 - 11:30:01 PDT