Ken Irving wrote:
On Thu, Feb 24, 2000 at 09:08:22PM +0000, Chris Reeves wrote:
George Zeigler wrote:
Hello, does anyone understand environment variables? I conpiled a program that transliterates character sets, and I don't understand the following instructions. I did make all These are the rest of the instructions.
... snipped
Well, to create a global variable, at the command prompt type: # MYVAR=myval this will assign the value myval to the variable MYVAR. You can check as follows: # echo $MYVAR
Environment variables are defined for each shell process, but must be "exported" (in bash) in order for them to be visible to child processes. This can be done after defining the variable as above, e.g.,
$ export MYVAR
or the two steps can be combined, as
$ export MYVAR=myval
The values are strings, and must be quoted to includes spaces, etc.
The exact syntax varies between different shells.
Environment variables are very basic to Unix and other OS's shells, and are used to hold the executable search path (PATH), the shell prompt (PS1), and many other values. In bash, the "set" command can be used to view all defined envars.
Sorry, my mistake :( I'll go and crawl back under that stone now... Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/