[AmigaOS 3.1 Command Reference/SetENV] 


Format: SETENV [<name>] [<string>] Template: NAME, STRING/F Purpose: To set a global variable. Path: Internal Specification: SETENV with <name> and <string> arguments creates a new global environment variable. The first word after SETENV is taken as the <name>. Everything else on the command line is taken as the <string> argument. Quotation marks are not required. Comments (statements prefaced with a semicolon (;)) are not allowed on a SETENV comand line. This includes command lines that are part of a script. SETENV with no arguments lists the current global variables. Global variables are stored in the ENV: directory and are used by all processes. However, if a local variable (defined by SET) and a global variable share the same name, the local variable will be used. Environment variables are called by scripts or other commands by including a dollar sign ($) in front of the variable name. To remove a global variable definition, use the UNSETENV command. Example 1: 1> SETENV Editor Extras:Tools/MEmacs Creates the environment variable Editor which can be used with the MORE utility. This specifies the editor as being MEmacs, located in the Tools drawer of the Extras disk. The variable Editor will be available in any Shell. Example 2: 1> SETENV Editor C:ED Same as above, only the editor specified is ED. 1> ECHO $Editor C:ED See also: GETENV UNSETENV

Converted from AmigaGuide to HTML by Jaruzel