LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Arggggg

[ILUG] Arggggg

Niall O Broin niall at linux.ie
Wed Nov 3 11:32:30 GMT 2004


On 3 Nov 2004, at 11:14, Ciaran Mac Lochlainn wrote:

>> For bash "export VAR=VALUE"
>> for csh "setenv VAR=VALUE"
>>
>> Greg
>>
> For csh, you don't use the equals sign when setting a variable -  e.g. 
> "setenv VAR VALUE"

Ah, but you DO if you're using set, e.g. set VAR=VALUE. This was always 
one thing which bugger me about csh, back in the days of pre history 
when I still used it. For those who may be confused, all shells have 
two conceptual set of variables, those which they use, and those which 
they will pass to their children.

Shell	Set variable in process	Set variable for children

sh		VAR=VALUE			VAR=VALUE ; export VAR
csh		set VAR=VALUE		setenv VAR VALUE
bash		VAR=VALUE			export VAR=VALUE

With sufficient application, you can make matters quite confusing.


Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell