Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.