3 tr \- translate character codes
5 \fBtr\fR [\fB\-cds\fR]\fR [\fIstring1\fR] [\fIstring2\fR]\fR
18 .FL "\-c" "Complement the set of characters in \fIstring1\fR"
19 .FL "\-d" "Delete all characters specified in \fIstring1\fR"
20 .FL "\-s" "Squeeze all runs of characters in \fIstring1\fR to one character"
22 .EX "tr \(fmA\-Z\(fm \(fma\-z\(fm <x >y " "Convert upper case to lower case"
23 .EX "tr \-d \(fm0123456789\(fm <f1 >f2 " "Delete all digits from \fIf1\fR"
27 performs simple character translation.
28 When no flag is specified, each character in
30 is mapped onto the corresponding character in
33 There are two types of
35 out there, one that requires [ and ] for character classes, and one that does
36 not. Here is what the example above would look like for a
38 that needs the brackets:
41 .B "tr \(fm[A\-Z]\(fm \(fm[a\-z]\(fm <x >y"
44 Use [ and ] if you want to be portable, because a
46 that doesn't need them will still accept the syntax and mindlessly
47 translate [ into [ and ] into ].