Debian Codegraph @

upstream/debian-trixie/man1/tr.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH TR "1" "June 2025" "GNU coreutils 9.7" "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 \fB\-c\fR, \fB\-C\fR, \fB\-\-complement\fR
16 use the complement of ARRAY1
17 .TP
18 \fB\-d\fR, \fB\-\-delete\fR
19 delete characters in ARRAY1, do not translate
20 .TP
21 \fB\-s\fR, \fB\-\-squeeze\-repeats\fR
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 \fB\-t\fR, \fB\-\-truncate\-set1\fR
27 first truncate ARRAY1 to length of ARRAY2
28 .TP
29 \fB\-\-help\fR
30 display this help and exit
31 .TP
32 \fB\-\-version\fR
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 .SH BUGS
120 .PP
121 Full support is available only for safe single-byte locales,
122 in which every possible input byte represents a single character.
123 The C locale is safe in GNU systems, so you can avoid this issue
124 in the shell by running
125 .B "LC_ALL=C tr"
126 instead of plain
127 .BR tr .
128 .SH AUTHOR
129 Written by Jim Meyering.
130 .SH "REPORTING BUGS"
131 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
132 .br
133 Report any translation bugs to <https://translationproject.org/team/>
134 .SH "SEE ALSO"
135 Full documentation <https://www.gnu.org/software/coreutils/tr>
136 .br
137 or available locally via: info \(aq(coreutils) tr invocation\(aq
138 .PP
139 .br
140 Packaged by Debian (9.7\-3)
141 .br
142 Copyright \(co 2025 Free Software Foundation, Inc.
143 .br
144 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
145 .br
146 This is free software: you are free to change and redistribute it.
147 .br
148 There is NO WARRANTY, to the extent permitted by law.