tr.1 (dfac4f3695ed938aee62fbb9a9abfb842e36fac2) tr.1 (6eb0710e98c71c7af52fed82319cc2069b18b9fa)
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the Institute of Electrical and Electronics Engineers, Inc.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 66 unchanged lines hidden (view full) ---

75and
76.Dq b .
77.It Fl c
78Same as
79.Fl C
80but complement the set of byte values in
81.Ar string1 .
82.It Fl d
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the Institute of Electrical and Electronics Engineers, Inc.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 66 unchanged lines hidden (view full) ---

75and
76.Dq b .
77.It Fl c
78Same as
79.Fl C
80but complement the set of byte values in
81.Ar string1 .
82.It Fl d
83The
84.Fl d
85option causes characters to be deleted from the input.
83Delete characters in
84.Ar string1
85from the input.
86.It Fl s
86.It Fl s
87The
88.Fl s
89option squeezes multiple occurrences of the characters listed in the last
87Squeeze multiple occurrences of the characters listed in the last
90operand (either
91.Ar string1
92or
93.Ar string2 )
94in the input into a single instance of the character.
95This occurs after all deletion and translation is completed.
96.It Fl u
88operand (either
89.Ar string1
90or
91.Ar string2 )
92in the input into a single instance of the character.
93This occurs after all deletion and translation is completed.
94.It Fl u
97The
98.Fl u
99option guarantees that any output is unbuffered.
95Guarantee that any output is unbuffered.
100.El
101.Pp
102In the first synopsis form, the characters in
103.Ar string1
104are translated into the characters in
105.Ar string2
106where the first character in
107.Ar string1

--- 130 unchanged lines hidden (view full) ---

238.Ev LC_ALL ,
239.Ev LC_CTYPE
240and
241.Ev LC_COLLATE
242environment variables affect the execution of
243.Nm
244as described in
245.Xr environ 7 .
96.El
97.Pp
98In the first synopsis form, the characters in
99.Ar string1
100are translated into the characters in
101.Ar string2
102where the first character in
103.Ar string1

--- 130 unchanged lines hidden (view full) ---

234.Ev LC_ALL ,
235.Ev LC_CTYPE
236and
237.Ev LC_COLLATE
238environment variables affect the execution of
239.Nm
240as described in
241.Xr environ 7 .
246.Sh DIAGNOSTICS
247.Ex -std
248.Sh EXAMPLES
249The following examples are shown as given to the shell:
250.Pp
251Create a list of the words in file1, one per line, where a word is taken to
252be a maximal string of letters.
253.Pp
254.D1 Li "tr -cs \*q[:alpha:]\*q \*q\en\*q < file1"
255.Pp

--- 4 unchanged lines hidden (view full) ---

260Strip out non-printable characters from file1.
261.Pp
262.D1 Li "tr -cd \*q[:print:]\*q < file1"
263.Pp
264Remove diacritical marks from all accented variants of the letter
265.Sq e :
266.Pp
267.Dl "tr \*q[=e=]\*q \*qe\*q"
242.Sh EXAMPLES
243The following examples are shown as given to the shell:
244.Pp
245Create a list of the words in file1, one per line, where a word is taken to
246be a maximal string of letters.
247.Pp
248.D1 Li "tr -cs \*q[:alpha:]\*q \*q\en\*q < file1"
249.Pp

--- 4 unchanged lines hidden (view full) ---

254Strip out non-printable characters from file1.
255.Pp
256.D1 Li "tr -cd \*q[:print:]\*q < file1"
257.Pp
258Remove diacritical marks from all accented variants of the letter
259.Sq e :
260.Pp
261.Dl "tr \*q[=e=]\*q \*qe\*q"
262.Sh DIAGNOSTICS
263.Ex -std
268.Sh COMPATIBILITY
269System V has historically implemented character ranges using the syntax
270``[c-c]'' instead of the ``c-c'' used by historic
271.Bx
272implementations and
273standardized by POSIX.
274System V shell scripts should work under this implementation as long as
275the range is intended to map in another range, i.e. the command

--- 47 unchanged lines hidden ---
264.Sh COMPATIBILITY
265System V has historically implemented character ranges using the syntax
266``[c-c]'' instead of the ``c-c'' used by historic
267.Bx
268implementations and
269standardized by POSIX.
270System V shell scripts should work under this implementation as long as
271the range is intended to map in another range, i.e. the command

--- 47 unchanged lines hidden ---