Name

print

Synopsis

    print [options] [string ...]

Korn shell only. Display string (on standard output by default). print includes the functions of echo and can be used in its place on most Unix systems.

Options

-

Ignore all subsequent options.

--

Same as -.

-e

Interpret escape sequences in argument strings. (This is the default, anyway.) Use it to undo an earlier -r in the same command line. ksh93 only.

-f format

Print like printf, using format as the format string. Ignores the -n, -r, and -R options. ksh93 only.

-n

Don’t end output with a newline.

-p

Send string to the process created by |&, instead of to standard output.

-r

Ignore the escape sequences often used with echo.

-R

Same as -r and ignore subsequent options (except -n).

-s

Send string to the history file.

-u [ n ]

Send string to file descriptor n (default is 1).

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.