Skip Navigation Links | |
Exit Print View | |
man pages section 1: User Commands Oracle Solaris 11.1 Information Library |
- shell built-in function to output characters to the screen or window
print [-CRenprsv] [-f format] [-u fd] [string...]
print [-Rnprsu [n]] [arg]...
print [-CRenprsv] [-f format] [-u fd] [string...]
The shell output mechanism. With no options or if the - option is specified, the arguments that follow are printed on standard output as described by echo(1). If the - option is specified, anything that follows it is processed as an argument, even if it begins with a -.
By default, print writes each string operand to standard output and appends a NEWLINE character.
Unless, the -r, -R, or -f option is specifed, each \ character in each string operand is processed specially as follows:
Alert character.
Backspace character.
Terminate output without appending NEWLINE. The remaining string operands are ignored.
Escape character (ASCII octal 033).
FORM FEED character.
NEWLINE character.
Tab character.
Vertical tab character.
Backslash character.
The 8-bit character whose ASCII code is the 1-, 2-, or 3-digit octal number x.
The following options are supported by ksh88:
Suppresses new-line from being added to the output.
Raw mode. Ignore the escape conventions of echo. The -R option prints all subsequent arguments and options other than -n.
Cause the arguments to be written onto the pipe of the process spawned with |& instead of standard output.
Cause the arguments to be written onto the history file instead of standard output.
Specify a one digit file descriptor unit number n on which the output is placed. The default is 1.
The following options are supported by /usr/man/print and ksh:
Unless -f is specified, process \ sequences in each string operand as described above. This is the default behavior.
If both -e and -r are specified, the last one specified is the one that is used.
Write the string arguments using the format string format and do not append a NEWLINE. See printf(1) for details on how to specify format.
When the -f option is specified and there are more string operands than format specifiers, the format string is reprocessed from the beginning. If there are fewer string operands than format specifiers, then outputting ends at the first unneeded format specifier.
Do not append a NEWLINE character to the output.
Write to the current co-process instead of standard output.
Do not process \ sequences in each string operand as described above.
If both -e and -r are specified, the last one specified is the one that is used.
Write the output as an entry in the shell history file instead of standard output.
Write to file descriptor number fd instead of standard output. The default value is 1.
Treat each string as a variable name and write the value in %B format. Cannot be used with -f
Treat each string as a variable name and write the value in %#B format. Cannot be used with -f.
The following exit values are returned:
Successful completion.
Output file is not open for writing.
See attributes(5) for descriptions of the following attributes:
|