LinuxCommandLibrary

print

TLDR

Print text (zsh/ksh)

$ print "Hello, World!"
copy
Print without newline
$ print -n "text"
copy
Print to file descriptor
$ print -u [2] "Error message"
copy
Print with escape sequences
$ print "Line1\nLine2"
copy

SYNOPSIS

print [options] [args]

DESCRIPTION

print outputs text to stdout. Shell built-in command.
The tool is more powerful than echo. Available in ksh and zsh.
print displays text.

PARAMETERS

ARGS

Text to print.
-n
No trailing newline.
-r
Ignore escape sequences.
-u N
Print to file descriptor N.
-l
Print arguments on separate lines.

CAVEATS

Shell built-in. Not available in bash (use printf).

HISTORY

print is a ksh/zsh built-in for text output.

SEE ALSO

echo(1), printf(1)

Copied to clipboard