Super User is a question and answer site for computer enthusiasts and power users. 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

really stumped with this.

i want to set a few variables for a script (paths)

according to everything i've found this should work but it doesn't;

SRC=/Volumes/MP_JUBBLER/testing/src/
SRC=/Volumes/MP_JUBBLER/testing/src/: Command not found.
echo $SRC
[MP-jynkBase:~] dan% echo $SRC
SRC: Undefined variable.

been bugging me for while!

many thanks, Dan.

share|improve this question
1  
Which shell are you using? echo $SHELL should tell you. I'm running BASH on Snow Leopard, and able to set variables the way you are trying to. – ayaz Nov 3 '10 at 12:52

I'm a Linux guy, but that looks like a (t)csh prompt to me instead of bash (which syntax you're trying to use).

In csh world variables can be set with

setenv SRC "/Volumes/MP_JUBBLER/testing/src/"

share|improve this answer
    
I think you're right. It looks like a csh error message, too. – Dennis Williamson Nov 3 '10 at 15:48
    
yeh its (t)csh and that works. Des that then set the varibale forever or just for this session? thanks, Dan. – daniel Crabbe Nov 3 '10 at 17:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .