mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 05:35:31 +02:00
print: add page (#15597)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
parent
54b97f98e3
commit
78d0ad2011
1 changed files with 25 additions and 0 deletions
25
pages/common/print.md
Normal file
25
pages/common/print.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# 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 "Linel" "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`
|
Loading…
Add table
Reference in a new issue