Debian Codegraph @

upstream/debian-unstable/man1/tr.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH TR "1" "February 2026" "GNU coreutils 9.10" "User Commands"
3 .SH NAME
4 tr \- translate or delete characters
5 .SH SYNOPSIS
6 .B tr
7 [\fI\,OPTION\/\fR]... \fI\,STRING1 \/\fR[\fI\,STRING2\/\fR]
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Translate, squeeze, and/or delete characters from standard input,
12 writing to standard output. STRING1 and STRING2 specify arrays of
13 characters ARRAY1 and ARRAY2 that control the action.
14 .TP
15 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#tr-c'\fB\-c, \-C, \-\-complement\fP\X'tty: link'
16 use the complement of ARRAY1
17 .TP
18 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#tr-d'\fB\-d, \-\-delete\fP\X'tty: link'
19 delete characters in ARRAY1, do not translate
20 .TP
21 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#tr-s'\fB\-s, \-\-squeeze\-repeats\fP\X'tty: link'
22 replace each sequence of a repeated character
23 that is listed in the last specified ARRAY,
24 with a single occurrence of that character
25 .TP
26 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#tr-t'\fB\-t, \-\-truncate\-set1\fP\X'tty: link'
27 first truncate ARRAY1 to length of ARRAY2
28 .TP
29 \X'tty: link https://www.gnu.org/software/coreutils/tr#tr--help'\fB\-\-help\fP\X'tty: link'
30 display this help and exit
31 .TP
32 \X'tty: link https://www.gnu.org/software/coreutils/tr#tr--version'\fB\-\-version\fP\X'tty: link'
33 output version information and exit
34 .PP
35 ARRAYs are specified as strings of characters. Most represent themselves.
36 Interpreted sequences are:
37 .TP
38 \eNNN
39 character with octal value NNN (1 to 3 octal digits)
40 .TP
41 \e\e
42 backslash
43 .TP
44 \ea
45 audible BEL
46 .TP
47 \eb
48 backspace
49 .TP
50 \ef
51 form feed
52 .TP
53 \en
54 new line
55 .TP
56 \er
57 return
58 .TP
59 \et
60 horizontal tab
61 .TP
62 \ev
63 vertical tab
64 .TP
65 CHAR1\-CHAR2
66 all characters from CHAR1 to CHAR2 in ascending order
67 .TP
68 [CHAR*]
69 in ARRAY2, copies of CHAR until length of ARRAY1
70 .TP
71 [CHAR*REPEAT]
72 REPEAT copies of CHAR, REPEAT octal if starting with 0
73 .TP
74 [:alnum:]
75 all letters and digits
76 .TP
77 [:alpha:]
78 all letters
79 .TP
80 [:blank:]
81 all horizontal whitespace
82 .TP
83 [:cntrl:]
84 all control characters
85 .TP
86 [:digit:]
87 all digits
88 .TP
89 [:graph:]
90 all printable characters, not including space
91 .TP
92 [:lower:]
93 all lower case letters
94 .TP
95 [:print:]
96 all printable characters, including space
97 .TP
98 [:punct:]
99 all punctuation characters
100 .TP
101 [:space:]
102 all horizontal or vertical whitespace
103 .TP
104 [:upper:]
105 all upper case letters
106 .TP
107 [:xdigit:]
108 all hexadecimal digits
109 .TP
110 [=CHAR=]
111 all characters which are equivalent to CHAR
112 .PP
113 Translation occurs if \fB\-d\fR is not given and both STRING1 and STRING2 appear.
114 \fB\-t\fR is only significant when translating. ARRAY2 is extended to length of
115 ARRAY1 by repeating its last character as necessary. Excess characters
116 of ARRAY2 are ignored. Character classes expand in unspecified order;
117 while translating, '[:lower:]' and '[:upper:]' may be used in pairs to
118 specify case conversion. Squeezing occurs after translation or deletion.
119 Arguments like '[...]' should be quoted, to avoid potential shell globbing.
120 .SH BUGS
121 .PP
122 Full support is available only for safe single-byte locales,
123 in which every possible input byte represents a single character.
124 The C locale is safe in GNU systems, so you can avoid this issue
125 in the shell by running
126 .B "LC_ALL=C tr"
127 instead of plain
128 .BR tr .
129 .SH AUTHOR
130 Written by Jim Meyering.
131 .SH "REPORTING BUGS"
132 Report bugs to: bug\[email protected]
133 .br
134 GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
135 .br
136 General help using GNU software: <https://www.gnu.org/gethelp/>
137 .br
138 Report any translation bugs to <https://translationproject.org/team/>
139 .SH "SEE ALSO"
140 Full documentation <https://www.gnu.org/software/coreutils/tr>
141 .br
142 or available locally via: info \(aq(coreutils) tr invocation\(aq
143 .PP
144 .br
145 Packaged by Debian (9.10\-1)
146 .br
147 Copyright \(co 2026 Free Software Foundation, Inc.
148 .br
149 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
150 .br
151 This is free software: you are free to change and redistribute it.
152 .br
153 There is NO WARRANTY, to the extent permitted by law.