Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ echo(1) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)



ECHO(1)             RISC/os Reference Manual              ECHO(1)



NAME
     echo - echo arguments

SYNOPSIS
     echo [ arg ] ...
     echo [ -n ] [ arg ]

DESCRIPTION
     echo writes its arguments separated by blanks and terminated
     by a new-line on the standard output.

     The /usr/bin/sh version understands the following C-like
     escape conventions if /usr/bin or /bin precedes /usr/ucb in
     the user's PATH.  Beware of conflicts with the shell's use
     of \.

          \b   backspace
          \c   print line without new-line
          \f   form-feed
          \n   new-line
          \r   carriage return
          \t   tab
          \v   vertical tab
          \\   backslash
          \0n  where n is the 8-bit character whose ASCII code is
               the 1-, 2- or 3-digit octal number representing
               that character.

     The following option is available to /usr/bin/sh users only
     if /usr/ucb precedes /usr/bin or /bin in the user's PATH. It
     is available to /usr/csh users, regardless of PATH:

          -n   Do not add the newline to the output.

     This option is also available if the -B (BSD only) option is
     set, regardless of the user's $PATH.

     echo is useful for producing diagnostics in command files,
     for sending known data into a pipe, and for displaying the
     contents of environment variables.

INTERNATIONAL FUNCTIONALITY
     Arguments containing characters from supplementary code sets
     can be specified.  Note that when octal notation is used,
     each byte of multibyte characters should be preceded by a
     backslash (\).

SEE ALSO
     sh(1).

NOTES
     The -n option is a transition aid for BSD applications, and



                        Printed 11/19/92                   Page 1





ECHO(1)             RISC/os Reference Manual              ECHO(1)



     may not be supported in future releases.

     When representing an 8-bit character by using the escape
     convention \0n, the n must always be preceded by the digit
     zero (0).

     For example, typing:  echo 'WARNING:\07' will print the
     phrase WARNING:  and sound the ``bell'' on your terminal.
     The use of single (or double) quotes (or two backslashes) is
     required to protect the ``\'' that precedes the ``07''.

     Following the \0, up to three digits are used in construct-
     ing the octal output character.  If, following the \0n, you
     want to echo additional digits that are not part of the
     octal representation, you must use the full 3-digit n.  For
     example, if you want to echo ``ESC 7'' you must use the
     three digits ``033'' rather than just the two digits ``33''
     after the \0.
        2 digits   Incorrect:   echo "\0337"  | od -xc
                   produces:    df0a                  (hex)
                                337                   (ascii)

        3 digits   Correct:     echo "\00337" | od -xc
                   produces:    lb37 0a00            (hex)
                                033 7                (ascii)

     For the octal equivalents of each character, see ascii(5) in
     the System Administrator's Reference Manual.



























 Page 2                 Printed 11/19/92



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026