Copyright (c) Hyperion Entertainment and contributors.
Difference between revisions of "AmigaOS Manual: AmigaDOS Environment Variables"
Jump to navigation
Jump to search
(Added new variables) |
(Added missing articles) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
! Variable Name !! Description |
! Variable Name !! Description |
||
|- |
|- |
||
− | | Charset || Contains currently used character set ISO code. |
+ | | Charset || Contains the currently used character set ISO code. |
|- |
|- |
||
| Echo || If this is set to ON, TRUE or 1, each command line will be printed before it is executed. |
| Echo || If this is set to ON, TRUE or 1, each command line will be printed before it is executed. |
||
Line 10: | Line 10: | ||
| Interactive || If this is set to ON, TRUE or 1, you will have to confirm every command 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. |
||
|- |
|- |
||
− | | Kickstart || Contains Kickstart version number. |
+ | | Kickstart || Contains the Kickstart version number. |
|- |
|- |
||
| KeepDoubleQuotes || When the command line is passed to a helper command, such as [[AmigaOS_Manual:_AmigaDOS_Command_Reference#RX|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. |
| KeepDoubleQuotes || When the command line is passed to a helper command, such as [[AmigaOS_Manual:_AmigaDOS_Command_Reference#RX|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. |
||
|- |
|- |
||
− | | Language || Contains name of the language currently in use. |
+ | | Language || Contains the name of the language currently in use in the currently used language. |
|- |
|- |
||
− | | LanguageName || Contains name of the language currently in use in English. |
+ | | LanguageName || Contains the name of the language currently in use in English. |
|- |
|- |
||
| OldRedirect || If this is set to ON, TRUE or 1, redirection for the commands [[AmigaOS_Manual:_AmigaDOS_Command_Reference#RUN|RUN]], [[AmigaOS_Manual:_AmigaDOS_Command_Reference#PIPE|PIPE]] and [[AmigaOS_Manual:_AmigaDOS_Command_Reference#ALIAS|ALIAS]] will be disabled and redirection of the standard error output stream will be disallowed. |
| OldRedirect || If this is set to ON, TRUE or 1, redirection for the commands [[AmigaOS_Manual:_AmigaDOS_Command_Reference#RUN|RUN]], [[AmigaOS_Manual:_AmigaDOS_Command_Reference#PIPE|PIPE]] and [[AmigaOS_Manual:_AmigaDOS_Command_Reference#ALIAS|ALIAS]] will be disabled and redirection of the standard error output stream will be disallowed. |
||
Line 26: | Line 26: | ||
| Result2 || This is set to the error code set by the last command invoked. The [[AmigaOS_Manual:_AmigaDOS_Command_Reference#WHY|WHY]] command will consult this and print the error message corresponding to the code. |
| Result2 || This is set to the error code set by the last command invoked. The [[AmigaOS_Manual:_AmigaDOS_Command_Reference#WHY|WHY]] command will consult this and print the error message corresponding to the code. |
||
|- |
|- |
||
− | | TZ || |
+ | | TZ || The current time zone. |
|- |
|- |
||
− | | TZONE || |
+ | | TZONE || The current time zone. |
|- |
|- |
||
| 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. |
| 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. |
||
|- |
|- |
||
− | | Workbench || Contains Workbench version number. |
+ | | Workbench || Contains the Workbench version number. |
|- |
|- |
||
| _LastCommand || The name of the last command invoked. |
| _LastCommand || The name of the last command invoked. |
||
Line 51: | Line 51: | ||
|- |
|- |
||
| _Title || The shell window title to be used; it supports the same formatting commands as the shell prompt. |
| _Title || The shell window title to be used; it supports the same formatting commands as the shell prompt. |
||
+ | |- |
||
+ | | _Verbosity || Suppresses output of the shell commands when set to a negative value. |
||
|- |
|- |
||
| _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. |
| _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. |
Latest revision as of 23:05, 24 July 2018
The shell both consults and changes certain environment variables while it processes commands. Here is a complete list:
Variable Name | Description |
---|---|
Charset | Contains the currently used character set ISO code. |
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. |
Kickstart | Contains the Kickstart version number. |
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. |
Language | Contains the name of the language currently in use in the currently used language. |
LanguageName | Contains the name of the language currently in use in English. |
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. |
TZ | The current time zone. |
TZONE | The current time zone. |
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. |
Workbench | Contains the Workbench version number. |
_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. |
_Verbosity | Suppresses output of the shell commands when set to a negative value. |
_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. |