.\" SPDX-License-Identifier: 0BSD .\" .Dd .Dt TR 1 .Os . .Sh NAME .Nm tr .Nd transliterate bytes . .Sh OPTIONS .Ss SET EXPANSION In all places where an arbitrary character is allowed, it can instead be one of the following escapes: .Bl -tag -compact -offset 4n -width ".Sy \e\e , \ea , \eb , \et" .It Sy \e\e , \ea , \eb , \et .It Sy \en , \ev , \ef , \er The backslash, bell, backspace, tab, line feed, vertical tab, form feed, and carriage return characters, respectively. . .It Sy \e Ns Ar O Ns Op Ar O Ns Op Ar O Octal byte of value. . .It Sy \e Ns Ar c Literal .Ar c , without considering any other sequences. .El .Pp Additionally, the following expansions are recognised: . .Bl -tag -offset 4n -width ".Sy [\& Ns Ar c Ns Sy *] , [\& Ns Ar c Ns Sy * Ns Ar len Ns Sy \&]" .It Ar f Ns Sy - Ns Ar t Inclusive range of all characters between .Ar f and .Ar t , in ascending order. Recognised only if .Ar t is at least .Ar f . . .It Sy [: Ns Ar class Ns Sy :] Where .Ar class may be any of .Bl -tag -compact -offset 2n -width ".Sy xdigit" .It Sy alnum alphanumeric characters .It Sy alpha letters .It Sy blank blanks .It Sy cntrl control characters .It Sy digit digits .It Sy graph graphic characters \(em printable except space .It Sy lower lower-case letters .It Sy print printable characters .It Sy punct punctuation characters .It Sy space whitespace .It Sy upper upper-case letters .It Sy xdigit hexadecimal digits .El These correspond directly to respective .Pp .St -p1003.1-2008 only guarantees equivalent relative ordering for .Sy [:lower:] and .Sy [:upper:] , so reliance upon any given ordering of characters generated by character classes may not be portable. . .It Sy [= Ns Ar e Ns Sy =] Just .Ar e . .St -p1003.1-2008 specifies this to be characters with the same equivalence (collation) class as .Ar e according to the current locale, but this is scarcely supported and most implementations just do .Ar e . . .It Sy [\& Ns Ar c Ns Sy *] , [\& Ns Ar c Ns Sy * Ns Ar len Ns Sy \&] If .Ar len is .Em 0 or missing, repeat .Ar c until length of set matches length of the first set (not available when expanding the first set), otherwise repeat .Ar c len times. .Ar len is a decimal integer .Pq octal if it starts with Sy 0 . .El .Pp If enabled, .Fl c occurs directly after processing these transformations.