csh setenv problem
    Lenny Saaf 
    saaf at joker.optics.rochester.edu
       
    Thu Aug 17 05:39:40 AEST 1989
    
    
  
I want to execute a csh script and set some variables for use in the
parent shell.  As I understand it, the script in the file is executed
in a subshell, so I think I have to "export" any csh variables I set
in the shell script.  That is, use setenv as opposed to set.  Well, I
can't seem to get it to work.  The shell script file looks like this:
# csh script
# filename is testscript
setenv FOO 'bar'
echo $FOO
# end
The result:
[1]% chmod +x testscript
[2]% testscript
bar
[3]% echo $FOO
FOO: Undefined variable.
What am I missing?
Related flame: HP's C shell documentation is lame.
--
* Len Saaf,  The Institute of Optics, University of Rochester,  Rochester, NY *
* Internet: saaf at joker.optics.rochester.edu  Bitnet: SAAF at UOROPT  Radio: NV2Z *
* Internet (last resort): saaf%joker.optics.rochester.edu at vm.cc.rochester.edu *
    
    
More information about the Comp.unix.questions
mailing list