print - Write output
Synopsis
print [ -nrR ] [
-u [ n ] ] [ argument ... ]
Description
You can use print to display each
argument on standard output separated by a <space>
character and followed by a <newline> character.
Unless you specify -r or -R,
print formats the output using the following conventions:
- \a Bell.
- \b Backspace.
- \c Print without adding newline character. The
remaining arguments are ignored.
- \f Formfeed.
- \n Newline.
- \r Return.
- \t Tab.
- \v Vertical tab.
- \\ Backslash.
- \0x The character whose EBCDIC code is the 1,
2, or 3-digit octal number x.
Options
- -n
- Do not add a trailing newline character to the output.
- -r
- Do not use the conventions listed above.
- -R
- Do not use the conventions listed above.
- -u n
- Write output to descriptor n if specified or
descriptor 1 by default. The descriptor must be 1, 2, or one you
opened with exec.
Operands
Each argument is printed on standard output.
Exit Status
- 0 when successful.
- >0 wnen unsuccessful.
Related information