mirror of
git://git.suckless.org/sbase
synced 2024-12-29 02:22:27 +00:00
60e972c229
Document the -d option and slightly change the wording of the page. Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
59 lines
1.0 KiB
Groff
59 lines
1.0 KiB
Groff
.TH TR 1 sbase\-VERSION
|
|
.SH NAME
|
|
tr \- translate characters
|
|
.SH SYNOPSIS
|
|
.B tr
|
|
.RB [ \-d ]
|
|
.RB set1
|
|
.P
|
|
.B tr
|
|
.RB set1
|
|
.RI set2
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-d
|
|
For compatibility. If given, characters in set1 will be deleted from the input and specifying set2 will result in an error.
|
|
.SH DESCRIPTION
|
|
.B tr
|
|
reads input from stdin replacing every character in
|
|
.B set1
|
|
with the character at the same index in
|
|
.B set2.
|
|
If set2 is not given
|
|
.B tr
|
|
deletes the characters in set1 from the input.
|
|
|
|
Sets are specified as strings of characters. Almost all represent themselves but the following ones will be interpreted:
|
|
.TP
|
|
\e\e
|
|
backslash
|
|
.TP
|
|
\ea
|
|
audible BEL
|
|
.TP
|
|
\ef
|
|
form feed
|
|
.TP
|
|
\en
|
|
new line
|
|
.TP
|
|
\er
|
|
return
|
|
.TP
|
|
\et
|
|
horizontal tab
|
|
.TP
|
|
\ev
|
|
vertical tab
|
|
.PP
|
|
If set1 is longer than set2
|
|
.B tr
|
|
will map all the remaining characters to the last one in set2. In case set2 is longer than set1, the remaining characters from set2 will be ignored.
|
|
.B
|
|
.SH NOTES
|
|
.B tr
|
|
is Unicode-aware but does not yet handle character classes (e.g. [:alnum:] or [:digit:]).
|
|
.SH SEE ALSO
|
|
.IR sed(1)
|
|
.IR awk(1)
|