print

Official Description

Shell output mechanism.

Syntax

print [-Rnprsu[n]] [argument ...]

Options

-p causes the arguments to be written to the pipe of the process spawned with |&.

-u specifies the file descriptor (unit number) to which to print.

Oddities

It's more efficient and more portable than the echo command.

Example

$ print $x
17
$
				

Get Korn Shell Programming by Example 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.