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.
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 \NNN character with octal value NNN (1 to 3 digits)
25
26 \\ backslash
27
28 \a alert (BEL)
29
30 \b backspace
31
32 \c produce no further output
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 \xHH byte with hexadecimal value HH (1 to 2 digits)
45
46 \uHHHH Unicode (ISO/IEC 10646) character with hex value HHHH (4 digits)
47
48 \UHHHHHHHH
49 Unicode character with hex value HHHHHHHH (8 digits)
50
51 %% a single %
52
53 %b ARGUMENT as a string with `\' escapes interpreted, except that
54 octal escapes are of the form \0 or \0NNN
55
56 and all C format specifications ending with one of diouxXfeEgGcs, with
57 ARGUMENTs converted to proper type first. Variable widths are handled.
58
59 NOTE: your shell may have its own version of printf, which usually
60 supersedes the version described here. Please refer to your shell's
61 documentation for details about the options it supports.
62
64 Written by David MacKenzie.
65
67 Report bugs to <bug-coreutils@gnu.org>.
68
70 Copyright © 2007 Free Software Foundation, Inc.
71 This is free software. You may redistribute copies of it under the
72 terms of the GNU General Public License
73 <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the
74 extent permitted by law.
75
77 The full documentation for printf is maintained as a Texinfo manual.
78 If the info and printf programs are properly installed at your site,
79 the command
80
81 info printf
82
83 should give you access to the complete manual.
84
85
86
87GNU coreutils 6.9 March 2008 PRINTF(1)