Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that in KSH, if I write export A=B the process which invoked my script can evaluate ${A}, and if I write A=B, then ${A} will have no value outside of my script.

How can this be done in TCSH? I only know of the style: setenv A B to set value for variables

share|improve this question
up vote 1 down vote accepted

Shell variables can be set via the set command in (t)csh.

set variable=value
share|improve this answer
Thanks - that indeed what I was looking for. Is Shell variables the official terminology in documentation? – RonK May 4 '11 at 10:34
Yes. Those variables are called shell variables. The other kind of variables (those to be set using setenv) are environment variables. – bmk May 4 '11 at 10:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.