There are many parameters in the shell that define parts of your working environment and which can be set interactively at the command prompt, in shell scripts, or in user-specific profile files (see subsection "The Profile Files" below). Each shell has one or more startup files. Work is currently in progress developing a set of standard startup files (for further information contact Alan Silverman or Tony Cass).
There is one restriction if you define environment variables in a shell script. If the environment variables are to be valid also in the current shell you must invoke the script in a special way without spawning a new process:
. myscript for the Bourne ShellOtherwise the environment variables are valid only within the script in which they are declared and all subprocesses invoked from there.source myscript for the C shell
A set of environment variables is already defined by the operating system and can be changed by each user for his personal working environment. In addition, he can of course also define new environment variables. The profile files which serve as an interface for initialisation of these variables at login are described later. By convention, environment variable names are upper case.
A list of the currently-valid environment variables may be obtained with the command
envIn the following examples, for the reasons of simplicity and shortness, the command prompt is assumed to be $.also printenv in the C shell