man-pages/man1/tr.1.html
2021-03-31 01:06:50 +01:00

155 lines
4.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of TR</TITLE>
</HEAD><BODY>
<H1>TR</H1>
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
tr - translate or delete characters
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>tr</B>
[<I>,OPTION/</I>]... <I>,SET1 /</I>[<I>,SET2/</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
Translate, squeeze, and/or delete characters from standard input,
writing to standard output.
<DL COMPACT>
<DT id="1"><B>-c</B>, <B>-C</B>, <B>--complement</B><DD>
use the complement of SET1
<DT id="2"><B>-d</B>, <B>--delete</B><DD>
delete characters in SET1, do not translate
<DT id="3"><B>-s</B>, <B>--squeeze-repeats</B><DD>
replace each sequence of a repeated character
that is listed in the last specified SET,
with a single occurrence of that character
<DT id="4"><B>-t</B>, <B>--truncate-set1</B><DD>
first truncate SET1 to length of SET2
<DT id="5"><B>--help</B><DD>
display this help and exit
<DT id="6"><B>--version</B><DD>
output version information and exit
</DL>
<P>
SETs are specified as strings of characters. Most represent themselves.
Interpreted sequences are:
<DL COMPACT>
<DT id="7">\NNN<DD>
character with octal value NNN (1 to 3 octal digits)
<DT id="8">\\<DD>
backslash
<DT id="9">\a<DD>
audible BEL
<DT id="10">\b<DD>
backspace
<DT id="11">\f<DD>
form feed
<DT id="12">\n<DD>
new line
<DT id="13">\r<DD>
return
<DT id="14">\t<DD>
horizontal tab
<DT id="15">\v<DD>
vertical tab
<DT id="16">CHAR1-CHAR2<DD>
all characters from CHAR1 to CHAR2 in ascending order
<DT id="17">[CHAR*]<DD>
in SET2, copies of CHAR until length of SET1
<DT id="18">[CHAR*REPEAT]<DD>
REPEAT copies of CHAR, REPEAT octal if starting with 0
<DT id="19">[:alnum:]<DD>
all letters and digits
<DT id="20">[:alpha:]<DD>
all letters
<DT id="21">[:blank:]<DD>
all horizontal whitespace
<DT id="22">[:cntrl:]<DD>
all control characters
<DT id="23">[:digit:]<DD>
all digits
<DT id="24">[:graph:]<DD>
all printable characters, not including space
<DT id="25">[:lower:]<DD>
all lower case letters
<DT id="26">[:print:]<DD>
all printable characters, including space
<DT id="27">[:punct:]<DD>
all punctuation characters
<DT id="28">[:space:]<DD>
all horizontal or vertical whitespace
<DT id="29">[:upper:]<DD>
all upper case letters
<DT id="30">[:xdigit:]<DD>
all hexadecimal digits
<DT id="31">[=CHAR=]<DD>
all characters which are equivalent to CHAR
</DL>
<P>
Translation occurs if <B>-d</B> is not given and both SET1 and SET2 appear.
<B>-t</B> may be used only when translating. SET2 is extended to length of
SET1 by repeating its last character as necessary. Excess characters
of SET2 are ignored. Only [:lower:] and [:upper:] are guaranteed to
expand in ascending order; used in SET2 while translating, they may
only be used in pairs to specify case conversion. <B>-s</B> uses the last
specified SET, and occurs after translation or deletion.
<A NAME="lbAE">&nbsp;</A>
<H2>AUTHOR</H2>
Written by Jim Meyering.
<A NAME="lbAF">&nbsp;</A>
<H2>REPORTING BUGS</H2>
GNU coreutils online help: &lt;<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>&gt;
<BR>
Report tr translation bugs to &lt;<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>&gt;
<A NAME="lbAG">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright &#169; 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>&gt;.
<BR>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
Full documentation at: &lt;<A HREF="https://www.gnu.org/software/coreutils/tr">https://www.gnu.org/software/coreutils/tr</A>&gt;
<BR>
or available locally via: info '(coreutils) tr invocation'
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="32"><A HREF="#lbAB">NAME</A><DD>
<DT id="33"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="34"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="35"><A HREF="#lbAE">AUTHOR</A><DD>
<DT id="36"><A HREF="#lbAF">REPORTING BUGS</A><DD>
<DT id="37"><A HREF="#lbAG">COPYRIGHT</A><DD>
<DT id="38"><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:28 GMT, March 31, 2021
</BODY>
</HTML>