1PRINTF(1) User Commands PRINTF(1)
2
3
4
6 printf - format and print data
7
9 printf FORMAT [ARGUMENT]...
10 printf OPTION
11
13 Print ARGUMENT(s) according to FORMAT, or execute according to OPTION:
14
15 --help display this help and exit
16
17 --version
18 output version information and exit
19
20 FORMAT controls the output as in C printf. Interpreted sequences are:
21
22 \" double quote
23
24 \\ backslash
25
26 \a alert (BEL)
27
28 \b backspace
29
30 \c produce no further output
31
32 \e escape
33
34 \f form feed
35
36 \n new line
37
38 \r carriage return
39
40 \t horizontal tab
41
42 \v vertical tab
43
44 \NNN byte with octal value NNN (1 to 3 digits)
45
46 \xHH byte with hexadecimal value HH (1 to 2 digits)
47
48 \uHHHH Unicode (ISO/IEC 10646) character with hex value HHHH (4 digits)
49
50 \UHHHHHHHH
51 Unicode character with hex value HHHHHHHH (8 digits)
52
53 %% a single %
54
55 %b ARGUMENT as a string with '\' escapes interpreted, except that
56 octal escapes are of the form \0 or \0NNN
57
58 and all C format specifications ending with one of diouxXfeEgGcs, with
59 ARGUMENTs converted to proper type first. Variable widths are handled.
60
61 NOTE: your shell may have its own version of printf, which usually
62 supersedes the version described here. Please refer to your shell's
63 documentation for details about the options it supports.
64
65 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
66 Report printf translation bugs to <http://translationproject.org/team/>
67
69 Written by David MacKenzie.
70
72 Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU
73 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
74 This is free software: you are free to change and redistribute it.
75 There is NO WARRANTY, to the extent permitted by law.
76
78 printf(3)
79
80 The full documentation for printf is maintained as a Texinfo manual.
81 If the info and printf programs are properly installed at your site,
82 the command
83
84 info coreutils 'printf invocation'
85
86 should give you access to the complete manual.
87
88
89
90GNU coreutils 8.22 October 2018 PRINTF(1)