[AmigaOS / ApolloOS Command Reference\Set] 
 

SET

Format: SET [<name>] [<string>] Template: NAME, STRING/F Purpose: To set a local variable. Path: Internal Specification: SET with <name> and <string> arguments creates a new environment variable. The first word after SET is taken as the <name>. Everything else on the command line is taken as the <string> argument. Quotation marks are not required. SET with no arguments lists the current local variables. An environment variable created with SET is local to the Shell in which it was created. If you create a new Shell with the NEWSHELL command, that Shell will also recognize any variables created in its parent Shell. However, if you create a new Shell with the Execute Command menu item or by opening the Shell icon, variables created with SET will not be recognized in the new Shells. You can call environment variables in a script or on a command line by placing a dollar sign ($) in front of the variable name. To remove a local variable definition, use the UNSET command. Examples: 1> SET Origin This process launched from icon Creates the local variable Origin which stores a reminder that a Shell was invoked from an icon rather than a NEWSHELL. 1> ECHO $Origin This process launched from icon See also: GET UNSET