Re: environment variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon Feb 10 2003 at 17:10, Aaron Konstam wrote:

> On Mon, Feb 10, 2003 at 02:36:43PM -0800, Jerry Roy wrote:
> > Hi List,
> >
> > How do I permanently set an environment variable so it works
> > across reboots? I have the command down, just don't know which
> > is the correct file (.bashrc? .profile?) to place it in. Someone
> > said there is a "Better" way. Please offer suggestions on
> > writing the command.

~/.bashrc on a per-user basis, /etc/profile (or a file in
/etc/profile.d/) for making it system-wide.

The man page for bash is admittedly long, but well worth reading.

There is also a great bash howto/tips page here:

	http://en.tldp.org/LDP/abs/html/

> > set $ICAClient:/test/icadir
> > export $ICAClient
> >
> The above seems strange sysntax for bash.
> ICAClient=/test/icadir
> export $ICAClient
> seems more appropriate.

No, just export the variable _name_ - not the value of the variable!
(What is have there will simply export an variable named
"/etc/icadir", oops :)

So, simply do "export ICAClient" after you set it (not using the
"set" command).

With bash you can set and export a variable in one hit:
	export ICAClient=/test/icadir

(This is not so portable for other sh-like shells).

Cheers
Tony



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux