tr.1 (af647767ed8f2ec38251e8185ef0b6adb35529e6) | tr.1 (69bd8767a990a230c6f8fc6758a07dfb61ca6b66) |
---|---|
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 --- 20 unchanged lines hidden (view full) --- 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)tr.1 8.1 (Berkeley) 6/6/93 36.\" | 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 --- 20 unchanged lines hidden (view full) --- 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)tr.1 8.1 (Berkeley) 6/6/93 36.\" |
37.Dd June 6, 1993 | 37.Dd October 11, 1997 |
38.Dt TR 1 39.Os 40.Sh NAME 41.Nm tr 42.Nd translate characters 43.Sh SYNOPSIS 44.Nm tr | 38.Dt TR 1 39.Os 40.Sh NAME 41.Nm tr 42.Nd translate characters 43.Sh SYNOPSIS 44.Nm tr |
45.Op Fl cs | 45.Op Fl csu |
46.Ar string1 string2 47.Nm tr | 46.Ar string1 string2 47.Nm tr |
48.Op Fl c | 48.Op Fl cu |
49.Fl d 50.Ar string1 51.Nm tr | 49.Fl d 50.Ar string1 51.Nm tr |
52.Op Fl c | 52.Op Fl cu |
53.Fl s 54.Ar string1 55.Nm tr | 53.Fl s 54.Ar string1 55.Nm tr |
56.Op Fl c | 56.Op Fl cu |
57.Fl ds 58.Ar string1 string2 59.Sh DESCRIPTION 60The 61.Nm 62utility copies the standard input to the standard output with substitution 63or deletion of selected characters. 64.Pp --- 12 unchanged lines hidden (view full) --- 77.Fl s 78option squeezes multiple occurrences of the characters listed in the last 79operand (either 80.Ar string1 81or 82.Ar string2 ) 83in the input into a single instance of the character. 84This occurs after all deletion and translation is completed. | 57.Fl ds 58.Ar string1 string2 59.Sh DESCRIPTION 60The 61.Nm 62utility copies the standard input to the standard output with substitution 63or deletion of selected characters. 64.Pp --- 12 unchanged lines hidden (view full) --- 77.Fl s 78option squeezes multiple occurrences of the characters listed in the last 79operand (either 80.Ar string1 81or 82.Ar string2 ) 83in the input into a single instance of the character. 84This occurs after all deletion and translation is completed. |
85.It Fl u 86The 87.Fl u 88option guarantees that any output is unbuffered. |
|
85.El 86.Pp 87In the first synopsis form, the characters in 88.Ar string1 89are translated into the characters in 90.Ar string2 91where the first character in 92.Ar string1 --- 192 unchanged lines hidden (view full) --- 285.Ar string2 286is duplicated if 287.Ar string2 288has less characters than 289.Ar string1 290is permitted by POSIX but is not required. 291Shell scripts attempting to be portable to other POSIX systems should use 292the ``[#*]'' convention instead of relying on this behavior. | 89.El 90.Pp 91In the first synopsis form, the characters in 92.Ar string1 93are translated into the characters in 94.Ar string2 95where the first character in 96.Ar string1 --- 192 unchanged lines hidden (view full) --- 289.Ar string2 290is duplicated if 291.Ar string2 292has less characters than 293.Ar string1 294is permitted by POSIX but is not required. 295Shell scripts attempting to be portable to other POSIX systems should use 296the ``[#*]'' convention instead of relying on this behavior. |
297The 298.Fl u 299option is an extension to the 300.St -p1003.2 301standard. |
|