2 .\" Copyright (c) 2008 Sun Microsystems, Inc. - All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
8 .TH PRINT 1 "Mar 27, 2008"
10 print \- shell built-in function to output characters to the screen or window
15 \fBprint\fR [\fB-Rnprsu\fR [\fIn\fR]] [\fIarg\fR]...
21 \fBprint\fR [\fB-Renprs\fR] [\fB-f\fR \fIformat\fR] [\fB-u\fR \fIfd\fR] [\fIstring\fR...]
28 The shell output mechanism. When no options are specified, or when an option
29 followed by \fB\&'\fR a \fB\(mi\fR is specified, or when just \fB-\fR is
30 specified, the arguments are printed on standard output as described by
35 By default, \fBprint\fR writes each string operand to standard output and
36 appends a NEWLINE character.
39 Unless, the \fB-r\fR, \fB-R\fR, or \fB-f\fR option is speciifed, each \fB\e\fR
40 character in each string operand is processed specially as follows:
65 Terminate output without appending NEWLINE. The remaining string operands are
75 Escape character (\fBASCII\fR octal \fB033\fR).
111 Vertical tab character.
126 \fB\fB\e0\fR\fIx\fR\fR
129 The 8-bit character whose \fBASCII\fR code is the \fB1\fR-, \fB2\fR-, or
130 \fB3\fR-digit octal number \fIx\fR.
137 The following options are supported by \fBksh\fR:
144 Suppresses \fBnew-line\fR from being added to the output.
150 \fB\fB-r\fR\fB-R\fR\fR
153 Raw mode. Ignore the escape conventions of \fBecho\fR. The \fB-R\fR option
154 prints all subsequent arguments and options other than \fB-n\fR.
163 Cause the arguments to be written onto the pipe of the process spawned with
164 \fB|&\fR instead of standard output.
173 Cause the arguments to be written onto the history file instead of standard
180 \fB\fB-u\fR [ \fIn\fR ]\fR
183 Specify a one digit file descriptor unit number \fIn\fR on which the output is
184 placed. The default is 1.
190 The following options are supported by \fBksh93\fR:
194 \fB\fB-e\fR \fI\fR\fR
197 Unless \fB-f\fR is specified, process \fB\e\fR sequences in each string operand
198 as described above. This is the default behavior.
200 If both \fB-e\fR and \fB-r\fR are specified, the last one specified is the one
207 \fB\fB-f\fR \fIformat\fR\fR
210 Write the string arguments using the format string \fIformat\fR and do not
211 append a NEWLINE. See \fBprintf\fR(1) for details on how to specify format.
213 When the \fB-f\fR option is specified and there are more string operands than
214 format specifiers, the format string is reprocessed from the beginning. If
215 there are fewer string operands than format specifiers, then outputting ends at
216 the first unneeded format specifier.
225 Do not append a NEWLINE character to the output.
234 Write to the current co-process instead of standard output.
247 Do not process \fB\e\fR sequences in each string operand as described above.
249 If both \fB-e\fR and \fB-r\fR are specified, the last one specified is the one
259 Write the output as an entry in the shell history file instead of standard
266 \fB\fB-u\fR \fIfd\fR\fR
269 Write to file descriptor number \fIfd\fR instead of standard output. The
270 default value is \fB1\fR.
276 The following exit values are returned:
283 Successful completion.
292 Output file is not open for writing.
298 \fBecho\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBprintf\fR(1),