ECHO [<string>] [NOLINE] [FIRST <n>] [LEN <n>] [TO <filename>] |
|
ECHO writes the specified string to the current output window or device. By default the string is sent to the screen, but if you use the TO option, you can send the string to any specified device or file.
When the NOLINE option is specified, ECHO does not automatically move the cursor to the next line after printing the string.
The FIRST and LEN options allow the echoing of a substring. FIRST <n> indicate the character position from which to begin the echo; LEN <n> indicates the number of characters of the substring to echo, beginning with the FIRST character. If the FIRST option is omitted and only the LEN keyword is given, the substring printed consists of the rightmost <n> characters of the main string. For example, if your string is 20 characters long and you specify LEN 4, the 17TH, 18th, 19th, and 20th characters of the string are echoed.
1> ECHO "hello out there!" NOLINE FIRST 0 LEN 5 hello1>
For further examples using the ECHO command, see Chapter 8.
Edits text files (a screen editor).
ED [FROM] <filename> [Size <n>] [WITH <filename>] [WINDOW <window specification>] [TABS <n>] [WIDTH | COLS <n>] [HEIGHT | ROWS <n>] |
|
FROM/A,SIZE/N,WITH/K,WINDOW/K,TABS/N,WIDTH=COLS/N,HEIGHT=ROWS/N |
|
For more information on ED, see Chapter 4. See Chapter 8 for an example using ED.
Edits text files by processing the source file sequentially (a line editor).
EDIT [FROM] <filename> [[TO <filename>] [WITH <filename>] [VER <filename>] [OPT P <lines> | W <chars> | P<lines>W<chars>] [WIDTH <chars>] [PREVIOUS <lines>] |
|
For more information on EDIT, see Chapter 4.
Specifies an alternative for an IF statement in a script file.
ELSE must be used in conjunction with the IF command. ELSE is used in an IF block of a script to specify an alternative action if the IF condition is not true. If the IF condition is not true, execution of the script jumps from the IF line to the line after ELSE; all intervening commands are skipped. If the IF condition is true, the commands immediately following the IF statement are executed up to the ELSE. Then, execution skips to the ENDIF statement that concludes the IF block.
Assume a script, called Display, contains the following block:
IF exists picfile
MultiView picfile
ELSE
ECHO "picfile is not in this directory"
ENDIF
If picfile can be found in the current directory, the MultiView program is executed and picfile is displayed on the screen.
If picfile cannot be found in the current directory, the script skips to the ECHO command. The following message is displayed in the Shell window:
picfile is not in this directory
Terminates an IF block in a script file.
ENDIF must be used when an IF commands is used. ENDIF is used in scripts at the end of an IF block. If the IF condition is not true or if the true-condition commands are executed and an ELSE is encountered, the execution of the script skips to the next ENDIF command. Every IF statement must be terminated by an ENDIF.
The ENDIF applies to the most recent IF or ELSE command.
See also: IF, ELSE. For examples using the ENDIF command, see Chapter 8.
ENDSHELL ends a Shell process and closes the Shell window.
The Shell process can also be ended by ENDCLI, by clicking on the close gadget, or by pressing CTRL+\.
Use ENDSHELL only when the Workbench or another Shell is running. If you quit the Workbench and you close your only Shell, you cannot communicate with the Amiga without rebooting.
The Shell window cannot close if any process that were launched from the Shell and not detached are still running. Even though the window stays open, the Shell does not accept new input. You must terminate those processes before the window closes. For example, if you opened an editor from the Shell, the Shell window does not close until you exit the editor.
For examples using the ENDSHELL command, see Chapter 8.
Terminates a SKIP block in a script file.
ENDSKIP is used in scripts to terminate the execution of a SKIP block. A SKIP block allows you to jump over intervening commands if a certain condition is met. When an ENDSKIP is encountered, execution of the script resumes at the line following the ENDSKIP. The condition flag is set to 5 (WARN).
Evaluates integer or Boolean expressions.
EVAL <value1> {[<operation>] [<value2>]} [TO <file>] [LFORMAT=<string>] |
|
|