[NTLK] [OT] Unix gurus: help!

From: Laurent Daudelin (laurent_daudelin_at_fanniemae.com)
Date: Thu Aug 21 2003 - 06:17:09 PDT


Sorry for the off-topic message. I could really use some help! I've been
banging my head over a stupid problem I'm experiencing on OS X and can't
waste anymore time. If I can't resolve this quickly, I will have to jump on
by Windoze box.

I've been working on Nexstep/Openstep since 1992, so I know a bit of Unix.
Right now, I'm trying to run a shell script from the terminal to set a few
environment variables. Problem is, no matter what I do, the variables are
undefined after I ran the script. I have a text file named 'setEnv.tcsh'
like this:

#!/bin/tcsh -f
setenv FOO "bar"
echo -n 'Foo is "'
echo -n $FOO
echo '".'

I run it from the terminal like ./setEnv.tcsh. It runs and displays the
value of FOO as 'Foo is "bar"', but whenever the script completes and I
check the value of ${FOO}, I get undefined variable.

What's going on? That's on OS X 10.2.6, btw...

Thanks for pointing my obvious stupid mistake...

-Laurent.

-- 
===========================================================================
Laurent Daudelin                    Developer, Multifamily, ESO, Fannie Mae
mailto:Laurent_Daudelin_at_fanniemae.com                   Washington, DC, USA
************************* Usual disclaimers apply *************************
-- 
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 - 07:00:01 PDT