TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:1769] environment variables



> This is the *easy* stuff that *this* newbie knows:
> 
> % env  <-- dumps all your variables to screen
> % echo $PATH <-- displays your path variable
> % export foo=bar <-- sets variable foo to "bar"

Are you running CSH or TCSH?  things are different between those and the
Bourne shell derivatives.. (I know nothing about Korn shells, tho...)

Anyway, I'm not a shell expert, but here are some things to do in BASH:

$ set	<--displays all variables..
$ export PATH=$PATH:/new/dir/to/add	<-- Appending an existing variable
$ export PATH=/first/dir:$PATH		<-- Prepending an existing variable

Mike Hicks