summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/tr.1
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man1/tr.1')
-rw-r--r--usr/src/man/man1/tr.139
1 files changed, 4 insertions, 35 deletions
diff --git a/usr/src/man/man1/tr.1 b/usr/src/man/man1/tr.1
index a331448112..a64186b42d 100644
--- a/usr/src/man/man1/tr.1
+++ b/usr/src/man/man1/tr.1
@@ -44,11 +44,10 @@
.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\"
-.TH TR 1 "Mar 3, 2009"
+.TH TR 1 "June 13, 2021"
.SH NAME
tr \- translate characters
.SH SYNOPSIS
-.LP
.nf
\fB/usr/bin/tr\fR [\fB-cds\fR] [\fIstring1\fR [\fIstring2\fR]]
.fi
@@ -89,15 +88,11 @@ tr \- translate characters
.fi
.SH DESCRIPTION
-.sp
-.LP
The \fBtr\fR utility copies the standard input to the standard output with
substitution or deletion of selected characters. The options specified and the
\fIstring1\fR and \fIstring2\fR operands control translations that occur while
copying characters and single-character collating elements.
.SH OPTIONS
-.sp
-.LP
The following options are supported:
.sp
.ne 2
@@ -244,8 +239,6 @@ appropriate. (See \fBtoupper\fR(3C) and \fBtolower\fR(3C)).
An empty string used for \fIstring1\fR or \fIstring2\fR produces undefined
results.
.SH OPERANDS
-.sp
-.LP
The following operands are supported:
.sp
.ne 2
@@ -305,7 +298,6 @@ unspecified.
.RE
.SS "/usr/xpg4/bin/tr"
-.sp
.ne 2
.na
\fB\fIc-c\fR\fR
@@ -315,7 +307,6 @@ unspecified.
.RE
.SS "/usr/bin/tr"
-.sp
.ne 2
.na
\fB[\fIc-c\fR]\fR
@@ -364,10 +355,10 @@ names \fBlower\fR or \fBupper\fR are valid in \fIstring2\fR and then only if
the corresponding character class \fBupper\fR and \fBlower\fR, respectively, is
specified in the same relative position in \fIstring1\fR. Such a specification
is interpreted as a request for case conversion. When \fB[:lower:]\fR appears
-in \fIstring1\fR and \fB[:upper:]\fR appears in \fIstring2,\fR the arrays
+in \fIstring1\fR and \fB[:upper:]\fR appears in \fIstring2\fR, the arrays
contain the characters from the \fBtoupper\fR mapping in the \fBLC_CTYPE\fR
category of the current locale. When \fB[:upper:]\fR appears in \fIstring1\fR
-and \fB[:lower:]\fR appears in \fIstring2,\fR the arrays contain the characters
+and \fB[:lower:]\fR appears in \fIstring2\fR, the arrays contain the characters
from the \fBtolower\fR mapping in the \fBLC_CTYPE\fR category of the current
locale. The first character from each mapping pair is in the array for
\fIstring1\fR and the second character from each mapping pair is in the array
@@ -407,17 +398,14 @@ as an octal value. Otherwise, it is interpreted as a decimal value.
.sp
If \fIn\fR is omitted or is \fB0\fR, \fB/usr/bin/tr\fR interprets this as huge;
\fB/usr/xpg4/bin/tr\fR and \fB/usr/xpg6/bin/tr\fR interprets this as large
-enough to extend the\fIstring2\fR-based sequence to the length of the
+enough to extend the \fIstring2\fR-based sequence to the length of the
\fIstring1\fR-based sequence.
.RE
.SH USAGE
-.sp
-.LP
See \fBlargefile\fR(5) for the description of the behavior of \fBtr\fR when
encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH EXAMPLES
-.LP
\fBExample 1 \fRCreating a list of words
.sp
.LP
@@ -471,14 +459,10 @@ and written to \fBfile2\fR.
.sp
.SH ENVIRONMENT VARIABLES
-.sp
-.LP
See \fBenviron\fR(5) for descriptions of the following environment variables
that affect the execution of \fBtr\fR: \fBLANG\fR, \fBLC_ALL\fR,
\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
.SH EXIT STATUS
-.sp
-.LP
The following exit values are returned:
.sp
.ne 2
@@ -499,13 +483,8 @@ An error occurred.
.RE
.SH ATTRIBUTES
-.sp
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.SS "/usr/bin/tr"
-.sp
-
-.sp
.TS
box;
c | c
@@ -516,9 +495,6 @@ CSI Enabled
.TE
.SS "/usr/xpg4/bin/tr"
-.sp
-
-.sp
.TS
box;
c | c
@@ -533,9 +509,6 @@ Standard See \fBstandards\fR(5).
.TE
.SS "/usr/xpg6/bin/tr"
-.sp
-
-.sp
.TS
box;
c | c
@@ -550,14 +523,10 @@ Standard See \fBstandards\fR(5).
.TE
.SH SEE ALSO
-.sp
-.LP
\fBed\fR(1), \fBsed\fR(1), \fBsh\fR(1), \fBtolower\fR(3C), \fBtoupper\fR(3C),
\fBascii\fR(5), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
\fBregex\fR(5), \fBstandards\fR(5)
.SH NOTES
-.sp
-.LP
Unlike some previous versions, \fB/usr/xpg4/bin/tr\fR correctly processes
\fBNUL\fR characters in its input stream. \fBNUL\fR characters can be stripped
by using \fBtr\fR \fB-d\fR \fB\&'\e000'\fR.