This section describes commands that display text strings.
echo
: Print a line of textSynopsis:
echo [ option ]... [ string ]...
echo
writes each given string to standard output, with a
space between each and a newline after the last one.
The program accepts the following options. Also see section Common options.
printf
: Format and print dataprintf format [ argument ]...
printf
prints the format string, interpreting `%'
directives and `\' escapes in the same way as the C printf
function. The format argument is re-used as necessary to convert
all of the given arguments.
printf
has one additional directive, `%b', which prints its
argument string with `\' escapes interpreted in the same way as in
the format string.
printf
interprets `\0ooo' in format as an octal number
(if ooo is 0 to 3 octal digits) specifying a character to print,
and `\xhhh' as a hexadecimal number (if hhh is 1 to 3 hex
digits) specifying a character to print.
An additional escape, `\c', causes printf
to produce no
further output.
The only options are a lone `--help' or `--version'. See section Common options.
yes
: Print a string until interrupted
yes
prints the command line arguments, separated by spaces and
followed by a newline, forever until it is killed. If no arguments are
given, it prints `y' followed by a newline forever until killed.
The only options are a lone `--help' or `--version'. See section Common options.