1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 20:22:07 +02:00
tldr/pages/common/print.md
Darío Hereñú 240171126f
print: fix typo in line 13 (#15724)
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
2025-02-12 13:28:04 +02:00

25 lines
610 B
Markdown

# print
> Z Shell (`zsh`) builtin. Prints arguments, similar to `echo`.
> See also: `echo`, `printf`, `zsh`.
> More information: <https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html>.
- Print input:
`print "Hello" "World"`
- Print separated by newline(s):
`print -l "Line1" "Line 2" "Line3"`
- Print without trailing newline:
`print -n "Hello"; print "World"`
- Enable backslash escapes:
`print -e "Line 1\nLine2"`
- Print arguments as described by 'printf' (for greater portability across shells, consider instead the `printf` command):
`print -f "%s is %d years old.\n" "Alice" 30`