print

display arguments from the KornShell

KornShell Built-in


SYNOPSIS

print [-npRrs] [-u[descriptor]] [argument...]


DESCRIPTION

Calling print without options or with only the - option outputs each argument to the standard output using the same escape conventions as echo. In this case, print and echo have the same functionality. The options accepted by print increase its functionality beyond that of echo.

Options

-n

does not automatically add a newline to the end of the output.

-p

sends output to a co-process. For a description of a co-process, see sh.

-R

is similar to -r except that print treats all subsequent options (except -n) as arguments rather than as options.

-r

ignores escape conventions.

-s

appends output to the command history file rather than sending it to standard output.

-u[descriptor]

redirects the output to the file corresponding to the single digit file descriptor. The default file descriptor is 1.


DIAGNOSTICS

Possible exit status values are:
0

Successful completion.

1

Failure due to any of the following:

— invalid descriptor specified with -u
— non-existent co-process

2

Failure because of an invalid command line option.

Cannot print on file descriptor ...

You tried to print on a file descriptor that was not opened for writing.

History not available

You specified the -s option to write into a history file, but at present you are not using a history file.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0.

print is a built-in command of the KornShell on UNIX, but not of the Bourne Shell.

It is an extension to the POSIX.2 and XPG standards.


NOTE

print is an alias built into the MKS KornShell.


SEE ALSO

Commands:
echo, fc, read, sh


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]