Copyright (c) Hyperion Entertainment and contributors.

AmigaOS Manual: AmigaDOS Environment Variables

From AmigaOS Documentation Wiki
Revision as of 21:19, 23 July 2018 by Janne Peräaho (talk | contribs) (Created page with "The shell both consults and changes certain environment variables while it processes commands. Here is a complete list: {| class="wikitable" ! Variable Name !! Description |-...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The shell both consults and changes certain environment variables while it processes commands. Here is a complete list:

Variable Name Description
Echo If this is set to ON, TRUE or 1, each command line will be printed before it is executed.
Interactive If this is set to ON, TRUE or 1, you will have to confirm every command before it is executed.
KeepDoubleQuotes When the command line is passed to a helper command, such as RX (for launching ARexx scripts), it may be enclosed in double quotes, if necessary. If the KeepDoubleQuotes variable is set to ON, TRUE or 1 any double quotes on the command line will remain unchanged, otherwise they will be removed.
OldRedirect If this is set to ON, TRUE or 1, redirection for the commands RUN, PIPE and ALIAS will be disabled and redirection of the standard error output stream will be disallowed.
Process This is set to the CLI process number of this shell (which you can check with the STATUS command).
RC This is set to the failure code of the last command invoked, e.g. 0 for success and 10, 20, etc. for failure.
Result2 This is set to the error code set by the last command invoked. The WHY command will consult this and print the error message corresponding to the code.
Viewer The name of the command to invoke for a picture, sound, animation, text or data file, if the DataTypes system feels responsible for a file. For example, if you set "Viewer" to "MultiView" and then enter the name of a picture file on the command line, then the shell will automatically invoke the "MultiView" command on it.
_LastCommand The name of the last command invoked.
_LastCommandArgs Any arguments passed to the last command invoked; this can be empty.
_mchar The character(s) which ties together several programs whose output should be merged with the output of the next program in the command line.
_pchar The character(s) which ties together several programs whose input should be fed into the output of the next program in the command line.
_RunTime This is set to the amount of time it took to execute the last command. Only actual execution time is counted and not how long it took to load the command. That number is given as the number of seconds, followed by an optional decimal point and the fraction of a second, e.g. "12.34".
_ScriptFile The name of the script file currently being processed, as started by using the EXECUTE command.
_ScriptLine The current line number of the script file being processed, as started by using the EXECUTE command.
_ShellVersion Version and revision number of the shell executing your command or script file, e.g. "51.49".
_Title The shell window title to be used; it supports the same formatting commands as the shell prompt.
_WarpUP_Kludge If this is set to ON, TRUE or 1, the shell will not try to release any signals which the previous command allocated but neglected to release when it returned. This must be done for WarpUP programs which will otherwise cause the shell to hang.