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
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!