Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

ECHO Internal
Purpose: To display a string.
Format: ECHO [<string>] [NOLINE] [FIRST<n>] [LEN<n>]
Template: /M, NOLINES/S, FIRST/K/N, LEN/K/N, TO/K
Path: Internal
ECHO writes the specified string to the current output window or device. By default this is the screen, but it could be any device or file. When the string contains spaces, the whole string must be enclosed in double quotes. (ECHO is commonly used in scripts.)

When the NOLINE argument is specified, ECHO does not automatically move the cursor to the next line after displaying the string. This enables you to string multiple output onto a single line.

The FIRST and LEN arguments enable the echoing of a substring.

  • FIRST <n> indicates the character position from which to begin the string to be echoed.
  • LEN <n> indicates the number of characters of the substring to be echoed, beginning with the FIRST <n> character.
  • If the FIRST <n> argument is omitted, and only the LEN <n> argument is given, the substring displayed will consist 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 will be echoed.
Example 1: 3.OS4:> ECHO "hello out there!"
hello out there!
3.OS4:>
displays the string specified.

Example 2:

3.OS4:> ECHO "hello out there!" FIRST 0 LEN 5
hello
3.OS4:>
displays only the first 5 characters of the string specified.

Example 3:

3.OS4:> ECHO "hello out there!" NOLINE LEN 5
here!3.OS4:>
displays only the last 5 characters of the string specified, and since NOLINE was specified the cursor did not move down.


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.


Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.