16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

echo<br />

Description<br />

Examples<br />

Usage Note<br />

Localization<br />

echo writes its arguments, specified with the argument argument, to standard<br />

output. echo accepts these C-style escape sequences:<br />

\a Bell<br />

\b Backspace<br />

\c Removes any following characters, including \n and \r.<br />

\f Form feed<br />

\n Newline<br />

\r Carriage return<br />

\t Horizontal tab<br />

\v Vertical tab<br />

\0num The byte with the numeric value specified by the zero to three-digit octal<br />

num.<br />

\– Backslash<br />

echo follows the final argument with a newline unless it finds \c in the arguments.<br />

Arguments are subject to standard argument manipulation.<br />

echo in the tcsh shell<br />

In the tcsh shell, echo writes each word to the shell’s standard output, separated by<br />

spaces and terminated with a newline.<br />

tcsh echo accepts these C-style escape sequences:<br />

\a Bell<br />

\b Backspace<br />

\e Escape<br />

\f Form feed<br />

\n Newline<br />

\r Carriage return<br />

\t Horizontal tab<br />

\v Vertical tab<br />

\nnn The EBCDIC character corresponding to the octal number nnn<br />

See “tcsh — Invoke a C shell” on page 626.<br />

1. One important use of echo is to expand filenames on the command line, as in:<br />

echo *.[ch]<br />

This displays the names of all files with names ending in .c or .h—typically C<br />

source and include (header) files. echo displays the names on a single line. If<br />

there are no filenames in the working directory that end in .c or .h, echo simply<br />

displays the string *.[ch].<br />

2. echo is also convenient for passing small amounts of input to a filter or a file:<br />

echo 'this is\nreal handy' > testfile<br />

echo is a built-in shell command.<br />

echo uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

246 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!