About Us Documentation

Contact Site Map
 

  

WinPak
Documentation

Go to the previous, next chapter.

Printing text

This section describes commands that display text strings.

echo: Print a line of text

Synopsis:

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.

-n - -n - Do not output the trailing newline.
-e - -e - Enable interpretation of the following backslash-escaped characters in each string:
\a - alert (bell) \b - backspace \c - suppress trailing newline \f - form feed \n - new line \r - carriage return \t - horizontal tab \v - vertical tab \\ - backslash \nnn - the character whose ASCII code is nnn (octal); if nnn is not a valid octal number, it is printed literally.

printf: Format and print data

Synopsis:

printf 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.


 

 

Email addresses listed on this site may  NOT be used for unsolicited commercial email.

Ready-to-Run Software, Inc Privacy Statement

Portions (c)Copyright, 1996-2005 by Ready-to-Run Software, Inc
(All rights reserved.)
212 Cedar Cove
Lansing, NY 14882
Phone: 607 533 UNIX (8649)
Fax: 607 533 4002