19b50d902SRodney W. Grimes.\" Copyright (c) 1991, 1993 29b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 39b50d902SRodney W. Grimes.\" 49b50d902SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 59b50d902SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc. 69b50d902SRodney W. Grimes.\" 79b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 89b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 99b50d902SRodney W. Grimes.\" are met: 109b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 119b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 129b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 139b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 149b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 15*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 169b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 179b50d902SRodney W. Grimes.\" without specific prior written permission. 189b50d902SRodney W. Grimes.\" 199b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 209b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 219b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 229b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 239b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 249b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 259b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 269b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 279b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 289b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 299b50d902SRodney W. Grimes.\" SUCH DAMAGE. 309b50d902SRodney W. Grimes.\" 310414904dSRuslan Ermilov.Dd October 13, 2006 329b50d902SRodney W. Grimes.Dt TR 1 339b50d902SRodney W. Grimes.Os 349b50d902SRodney W. Grimes.Sh NAME 359b50d902SRodney W. Grimes.Nm tr 369b50d902SRodney W. Grimes.Nd translate characters 379b50d902SRodney W. Grimes.Sh SYNOPSIS 388fe908efSRuslan Ermilov.Nm 39dfac4f36STim J. Robbins.Op Fl Ccsu 409b50d902SRodney W. Grimes.Ar string1 string2 418fe908efSRuslan Ermilov.Nm 42dfac4f36STim J. Robbins.Op Fl Ccu 439b50d902SRodney W. Grimes.Fl d 449b50d902SRodney W. Grimes.Ar string1 458fe908efSRuslan Ermilov.Nm 46dfac4f36STim J. Robbins.Op Fl Ccu 479b50d902SRodney W. Grimes.Fl s 489b50d902SRodney W. Grimes.Ar string1 498fe908efSRuslan Ermilov.Nm 50dfac4f36STim J. Robbins.Op Fl Ccu 519b50d902SRodney W. Grimes.Fl ds 529b50d902SRodney W. Grimes.Ar string1 string2 539b50d902SRodney W. Grimes.Sh DESCRIPTION 549b50d902SRodney W. GrimesThe 55af647767SPhilippe Charnier.Nm 569b50d902SRodney W. Grimesutility copies the standard input to the standard output with substitution 579b50d902SRodney W. Grimesor deletion of selected characters. 589b50d902SRodney W. Grimes.Pp 599b50d902SRodney W. GrimesThe following options are available: 609b50d902SRodney W. Grimes.Bl -tag -width Ds 61dfac4f36STim J. Robbins.It Fl C 62dfac4f36STim J. RobbinsComplement the set of characters in 639b50d902SRodney W. Grimes.Ar string1 , 64dfac4f36STim J. Robbinsthat is 6506e482e6SRuslan Ermilov.Dq Fl C Li ab 66dfac4f36STim J. Robbinsincludes every character except for 6706e482e6SRuslan Ermilov.Ql a 68dfac4f36STim J. Robbinsand 6906e482e6SRuslan Ermilov.Ql b . 70dfac4f36STim J. Robbins.It Fl c 71dfac4f36STim J. RobbinsSame as 72dfac4f36STim J. Robbins.Fl C 73e263a4b4STim J. Robbinsbut complement the set of values in 74dfac4f36STim J. Robbins.Ar string1 . 759b50d902SRodney W. Grimes.It Fl d 766eb0710eSTim J. RobbinsDelete characters in 776eb0710eSTim J. Robbins.Ar string1 786eb0710eSTim J. Robbinsfrom the input. 799b50d902SRodney W. Grimes.It Fl s 806eb0710eSTim J. RobbinsSqueeze multiple occurrences of the characters listed in the last 819b50d902SRodney W. Grimesoperand (either 829b50d902SRodney W. Grimes.Ar string1 839b50d902SRodney W. Grimesor 849b50d902SRodney W. Grimes.Ar string2 ) 859b50d902SRodney W. Grimesin the input into a single instance of the character. 869b50d902SRodney W. GrimesThis occurs after all deletion and translation is completed. 8769bd8767SWolfgang Helbig.It Fl u 886eb0710eSTim J. RobbinsGuarantee that any output is unbuffered. 899b50d902SRodney W. Grimes.El 909b50d902SRodney W. Grimes.Pp 919b50d902SRodney W. GrimesIn the first synopsis form, the characters in 929b50d902SRodney W. Grimes.Ar string1 939b50d902SRodney W. Grimesare translated into the characters in 949b50d902SRodney W. Grimes.Ar string2 959b50d902SRodney W. Grimeswhere the first character in 969b50d902SRodney W. Grimes.Ar string1 979b50d902SRodney W. Grimesis translated into the first character in 989b50d902SRodney W. Grimes.Ar string2 999b50d902SRodney W. Grimesand so on. 1009b50d902SRodney W. GrimesIf 1019b50d902SRodney W. Grimes.Ar string1 1029b50d902SRodney W. Grimesis longer than 1039b50d902SRodney W. Grimes.Ar string2 , 1049b50d902SRodney W. Grimesthe last character found in 1059b50d902SRodney W. Grimes.Ar string2 1069b50d902SRodney W. Grimesis duplicated until 1079b50d902SRodney W. Grimes.Ar string1 1089b50d902SRodney W. Grimesis exhausted. 1099b50d902SRodney W. Grimes.Pp 1109b50d902SRodney W. GrimesIn the second synopsis form, the characters in 1119b50d902SRodney W. Grimes.Ar string1 1129b50d902SRodney W. Grimesare deleted from the input. 1139b50d902SRodney W. Grimes.Pp 1149b50d902SRodney W. GrimesIn the third synopsis form, the characters in 1159b50d902SRodney W. Grimes.Ar string1 1169b50d902SRodney W. Grimesare compressed as described for the 1179b50d902SRodney W. Grimes.Fl s 1189b50d902SRodney W. Grimesoption. 1199b50d902SRodney W. Grimes.Pp 1209b50d902SRodney W. GrimesIn the fourth synopsis form, the characters in 1219b50d902SRodney W. Grimes.Ar string1 1229b50d902SRodney W. Grimesare deleted from the input, and the characters in 1239b50d902SRodney W. Grimes.Ar string2 1249b50d902SRodney W. Grimesare compressed as described for the 1259b50d902SRodney W. Grimes.Fl s 1269b50d902SRodney W. Grimesoption. 1279b50d902SRodney W. Grimes.Pp 1289b50d902SRodney W. GrimesThe following conventions can be used in 1299b50d902SRodney W. Grimes.Ar string1 1309b50d902SRodney W. Grimesand 1319b50d902SRodney W. Grimes.Ar string2 1329b50d902SRodney W. Grimesto specify sets of characters: 1339b50d902SRodney W. Grimes.Bl -tag -width [:equiv:] 1349b50d902SRodney W. Grimes.It character 1359b50d902SRodney W. GrimesAny character not described by one of the following conventions 1369b50d902SRodney W. Grimesrepresents itself. 1379b50d902SRodney W. Grimes.It \eoctal 1389b50d902SRodney W. GrimesA backslash followed by 1, 2 or 3 octal digits represents a character 1399b50d902SRodney W. Grimeswith that encoded value. 1409b50d902SRodney W. GrimesTo follow an octal sequence with a digit as a character, left zero-pad 1419b50d902SRodney W. Grimesthe octal sequence to the full 3 octal digits. 1429b50d902SRodney W. Grimes.It \echaracter 1439b50d902SRodney W. GrimesA backslash followed by certain special characters maps to special 1449b50d902SRodney W. Grimesvalues. 1459597e1c2SRuslan Ermilov.Bl -column "\ea" 146c2965cd1SJoel Dahl.It "\ea <alert character>" 147c2965cd1SJoel Dahl.It "\eb <backspace>" 148c2965cd1SJoel Dahl.It "\ef <form-feed>" 149c2965cd1SJoel Dahl.It "\en <newline>" 150c2965cd1SJoel Dahl.It "\er <carriage return>" 151c2965cd1SJoel Dahl.It "\et <tab>" 152c2965cd1SJoel Dahl.It "\ev <vertical tab>" 1539b50d902SRodney W. Grimes.El 154726b61abSRuslan Ermilov.Pp 1559b50d902SRodney W. GrimesA backslash followed by any other character maps to that character. 1569b50d902SRodney W. Grimes.It c-c 15721f53e91SAndrey A. ChernovFor non-octal range endpoints 15821f53e91SAndrey A. Chernovrepresents the range of characters between the range endpoints, inclusive, 159a508a04dSAndrey A. Chernovin ascending order, 160a508a04dSAndrey A. Chernovas defined by the collation sequence. 16121f53e91SAndrey A. ChernovIf either or both of the range endpoints are octal sequences, it 16221f53e91SAndrey A. Chernovrepresents the range of specific coded values between the 16321f53e91SAndrey A. Chernovrange endpoints, inclusive. 1645b4fa425SAndrey A. Chernov.Pp 1655b4fa425SAndrey A. Chernov.Bf Em 1665b4fa425SAndrey A. ChernovSee the 1675b4fa425SAndrey A. Chernov.Sx COMPATIBILITY 1685b4fa425SAndrey A. Chernovsection below for an important note regarding 1695b4fa425SAndrey A. Chernovdifferences in the way the current 1705b4fa425SAndrey A. Chernovimplementation interprets range expressions differently from 1715b4fa425SAndrey A. Chernovprevious implementations. 1720b651019STim J. Robbins.Ef 1739b50d902SRodney W. Grimes.It [:class:] 1749b50d902SRodney W. GrimesRepresents all characters belonging to the defined character class. 1759b50d902SRodney W. GrimesClass names are: 1760414904dSRuslan Ermilov.Bl -column "phonogram" 177c2965cd1SJoel Dahl.It "alnum <alphanumeric characters>" 178c2965cd1SJoel Dahl.It "alpha <alphabetic characters>" 179c2965cd1SJoel Dahl.It "blank <whitespace characters>" 180c2965cd1SJoel Dahl.It "cntrl <control characters>" 181c2965cd1SJoel Dahl.It "digit <numeric characters>" 182c2965cd1SJoel Dahl.It "graph <graphic characters>" 183c2965cd1SJoel Dahl.It "ideogram <ideographic characters>" 184c2965cd1SJoel Dahl.It "lower <lower-case alphabetic characters>" 185c2965cd1SJoel Dahl.It "phonogram <phonographic characters>" 186c2965cd1SJoel Dahl.It "print <printable characters>" 187c2965cd1SJoel Dahl.It "punct <punctuation characters>" 188c2965cd1SJoel Dahl.It "rune <valid characters>" 189c2965cd1SJoel Dahl.It "space <space characters>" 190c2965cd1SJoel Dahl.It "special <special characters>" 191c2965cd1SJoel Dahl.It "upper <upper-case characters>" 192c2965cd1SJoel Dahl.It "xdigit <hexadecimal characters>" 1939b50d902SRodney W. Grimes.El 1949b50d902SRodney W. Grimes.Pp 1959b88faecSRuslan Ermilov.\" All classes may be used in 1969b88faecSRuslan Ermilov.\" .Ar string1 , 1979b88faecSRuslan Ermilov.\" and in 1989b88faecSRuslan Ermilov.\" .Ar string2 1999b88faecSRuslan Ermilov.\" when both the 2009b88faecSRuslan Ermilov.\" .Fl d 2019b88faecSRuslan Ermilov.\" and 2029b88faecSRuslan Ermilov.\" .Fl s 2039b88faecSRuslan Ermilov.\" options are specified. 2049b88faecSRuslan Ermilov.\" Otherwise, only the classes ``upper'' and ``lower'' may be used in 2059b88faecSRuslan Ermilov.\" .Ar string2 2069b88faecSRuslan Ermilov.\" and then only when the corresponding class (``upper'' for ``lower'' 2079b88faecSRuslan Ermilov.\" and vice-versa) is specified in the same relative position in 2089b88faecSRuslan Ermilov.\" .Ar string1 . 2099b88faecSRuslan Ermilov.\" .Pp 21026bdc1d1STim J. RobbinsWhen 21126bdc1d1STim J. Robbins.Dq Li [:lower:] 21226bdc1d1STim J. Robbinsappears in 213bc44c44aSAndrey A. Chernov.Ar string1 21426bdc1d1STim J. Robbinsand 21526bdc1d1STim J. Robbins.Dq Li [:upper:] 21626bdc1d1STim J. Robbinsappears in the same relative position in 217bc44c44aSAndrey A. Chernov.Ar string2 , 2188ad968eeSAndrey A. Chernovit represents the characters pairs from the 219bc44c44aSAndrey A. Chernov.Dv toupper 220bc44c44aSAndrey A. Chernovmapping in the 221bc44c44aSAndrey A. Chernov.Ev LC_CTYPE 222bc44c44aSAndrey A. Chernovcategory of the current locale. 22326bdc1d1STim J. RobbinsWhen 22426bdc1d1STim J. Robbins.Dq Li [:upper:] 22526bdc1d1STim J. Robbinsappears in 226bc44c44aSAndrey A. Chernov.Ar string1 22726bdc1d1STim J. Robbinsand 22826bdc1d1STim J. Robbins.Dq Li [:lower:] 22926bdc1d1STim J. Robbinsappears in the same relative position in 230bc44c44aSAndrey A. Chernov.Ar string2 , 2318ad968eeSAndrey A. Chernovit represents the characters pairs from the 232bc44c44aSAndrey A. Chernov.Dv tolower 233bc44c44aSAndrey A. Chernovmapping in the 234bc44c44aSAndrey A. Chernov.Ev LC_CTYPE 235bc44c44aSAndrey A. Chernovcategory of the current locale. 236bc44c44aSAndrey A. Chernov.Pp 2378ad968eeSAndrey A. ChernovWith the exception of case conversion, 2388ad968eeSAndrey A. Chernovcharacters in the classes are in unspecified order. 2399b50d902SRodney W. Grimes.Pp 240b9a86ec9SPhilippe CharnierFor specific information as to which 241b9a86ec9SPhilippe Charnier.Tn ASCII 242b9a86ec9SPhilippe Charniercharacters are included 2439b50d902SRodney W. Grimesin these classes, see 2449b50d902SRodney W. Grimes.Xr ctype 3 2459b50d902SRodney W. Grimesand related manual pages. 2469b50d902SRodney W. Grimes.It [=equiv=] 24785f6c317STim J. RobbinsRepresents all characters belonging to the same equivalence class as 24885f6c317STim J. Robbins.Ar equiv , 24985f6c317STim J. Robbinsordered by their encoded values. 2509b50d902SRodney W. Grimes.It [#*n] 2519b50d902SRodney W. GrimesRepresents 2529b50d902SRodney W. Grimes.Ar n 2539b50d902SRodney W. Grimesrepeated occurrences of the character represented by 2549b50d902SRodney W. Grimes.Ar # . 2559b50d902SRodney W. GrimesThis 2569b50d902SRodney W. Grimesexpression is only valid when it occurs in 2579b50d902SRodney W. Grimes.Ar string2 . 2589b50d902SRodney W. GrimesIf 2599b50d902SRodney W. Grimes.Ar n 2609b50d902SRodney W. Grimesis omitted or is zero, it is be interpreted as large enough to extend 2619b50d902SRodney W. Grimes.Ar string2 2629b50d902SRodney W. Grimessequence to the length of 2639b50d902SRodney W. Grimes.Ar string1 . 2649b50d902SRodney W. GrimesIf 2659b50d902SRodney W. Grimes.Ar n 2669b50d902SRodney W. Grimeshas a leading zero, it is interpreted as an octal value, otherwise, 26736a142c4SRuslan Ermilovit is interpreted as a decimal value. 2689b50d902SRodney W. Grimes.El 26985f6c317STim J. Robbins.Sh ENVIRONMENT 27085f6c317STim J. RobbinsThe 27106e482e6SRuslan Ermilov.Ev LANG , LC_ALL , LC_CTYPE 27285f6c317STim J. Robbinsand 27385f6c317STim J. Robbins.Ev LC_COLLATE 27485f6c317STim J. Robbinsenvironment variables affect the execution of 27585f6c317STim J. Robbins.Nm 27685f6c317STim J. Robbinsas described in 27785f6c317STim J. Robbins.Xr environ 7 . 2786c7216dfSRuslan Ermilov.Sh EXIT STATUS 2796c7216dfSRuslan Ermilov.Ex -std 2809b50d902SRodney W. Grimes.Sh EXAMPLES 2819b50d902SRodney W. GrimesThe following examples are shown as given to the shell: 282726b61abSRuslan Ermilov.Pp 2839b50d902SRodney W. GrimesCreate a list of the words in file1, one per line, where a word is taken to 2849b50d902SRodney W. Grimesbe a maximal string of letters. 285726b61abSRuslan Ermilov.Pp 2869b50d902SRodney W. Grimes.D1 Li "tr -cs \*q[:alpha:]\*q \*q\en\*q < file1" 287726b61abSRuslan Ermilov.Pp 2889b50d902SRodney W. GrimesTranslate the contents of file1 to upper-case. 289726b61abSRuslan Ermilov.Pp 2909b50d902SRodney W. Grimes.D1 Li "tr \*q[:lower:]\*q \*q[:upper:]\*q < file1" 291726b61abSRuslan Ermilov.Pp 2920b651019STim J. Robbins(This should be preferred over the traditional 2930b651019STim J. Robbins.Ux 2940b651019STim J. Robbinsidiom of 2953baccdb9SRuslan Ermilov.Dq Li "tr a-z A-Z" , 2960b651019STim J. Robbinssince it works correctly in all locales.) 2970b651019STim J. Robbins.Pp 2989b50d902SRodney W. GrimesStrip out non-printable characters from file1. 299726b61abSRuslan Ermilov.Pp 3009b50d902SRodney W. Grimes.D1 Li "tr -cd \*q[:print:]\*q < file1" 30185f6c317STim J. Robbins.Pp 30285f6c317STim J. RobbinsRemove diacritical marks from all accented variants of the letter 30306e482e6SRuslan Ermilov.Ql e : 30485f6c317STim J. Robbins.Pp 30585f6c317STim J. Robbins.Dl "tr \*q[=e=]\*q \*qe\*q" 3069b50d902SRodney W. Grimes.Sh COMPATIBILITY 3075b4fa425SAndrey A. ChernovPrevious 3080b651019STim J. Robbins.Fx 3090b651019STim J. Robbinsimplementations of 3100b651019STim J. Robbins.Nm 3110b651019STim J. Robbinsdid not order characters in range expressions according to the current 3125b4fa425SAndrey A. Chernovlocale's collation order, making it possible to convert unaccented Latin 3135b4fa425SAndrey A. Chernovcharacters (esp.\& as found in English text) from upper to lower case using 3140b651019STim J. Robbinsthe traditional 3150b651019STim J. Robbins.Ux 3160b651019STim J. Robbinsidiom of 3173baccdb9SRuslan Ermilov.Dq Li "tr A-Z a-z" . 3185b4fa425SAndrey A. ChernovSince 3195b4fa425SAndrey A. Chernov.Nm 3205b4fa425SAndrey A. Chernovnow obeys the locale's collation order, this idiom may not produce 3215b4fa425SAndrey A. Chernovcorrect results when there is not a 1:1 mapping between lower and 3225b4fa425SAndrey A. Chernovupper case, or when the order of characters within the two cases differs. 3230b651019STim J. RobbinsAs noted in the 3240b651019STim J. Robbins.Sx EXAMPLES 3250b651019STim J. Robbinssection above, the character class expressions 3263baccdb9SRuslan Ermilov.Dq Li [:lower:] 3270b651019STim J. Robbinsand 3283baccdb9SRuslan Ermilov.Dq Li [:upper:] 3290b651019STim J. Robbinsshould be used instead of explicit character ranges like 3303baccdb9SRuslan Ermilov.Dq Li a-z 3310b651019STim J. Robbinsand 3323baccdb9SRuslan Ermilov.Dq Li A-Z . 3330b651019STim J. Robbins.Pp 3344573d501SAndrey A. Chernov.Dq Li [=equiv=] 3354573d501SAndrey A. Chernovexpression and collation for ranges 3364573d501SAndrey A. Chernovare implemented for single byte locales only. 3374573d501SAndrey A. Chernov.Pp 3389b50d902SRodney W. GrimesSystem V has historically implemented character ranges using the syntax 33926bdc1d1STim J. Robbins.Dq Li [c-c] 34026bdc1d1STim J. Robbinsinstead of the 34126bdc1d1STim J. Robbins.Dq Li c-c 34226bdc1d1STim J. Robbinsused by historic 343753d686dSRuslan Ermilov.Bx 344753d686dSRuslan Ermilovimplementations and 3459b50d902SRodney W. Grimesstandardized by POSIX. 3469b50d902SRodney W. GrimesSystem V shell scripts should work under this implementation as long as 3476a3e8b0aSRuslan Ermilovthe range is intended to map in another range, i.e., the command 34826bdc1d1STim J. Robbins.Dq Li "tr [a-z] [A-Z]" 34926bdc1d1STim J. Robbinswill work as it will map the 35026bdc1d1STim J. Robbins.Ql \&[ 35126bdc1d1STim J. Robbinscharacter in 3529b50d902SRodney W. Grimes.Ar string1 35326bdc1d1STim J. Robbinsto the 35426bdc1d1STim J. Robbins.Ql \&[ 35526bdc1d1STim J. Robbinscharacter in 3569b50d902SRodney W. Grimes.Ar string2 . 3579b50d902SRodney W. GrimesHowever, if the shell script is deleting or squeezing characters as in 35826bdc1d1STim J. Robbinsthe command 35926bdc1d1STim J. Robbins.Dq Li "tr -d [a-z]" , 36026bdc1d1STim J. Robbinsthe characters 36126bdc1d1STim J. Robbins.Ql \&[ 36226bdc1d1STim J. Robbinsand 36326bdc1d1STim J. Robbins.Ql \&] 36426bdc1d1STim J. Robbinswill be 3659b50d902SRodney W. Grimesincluded in the deletion or compression list which would not have happened 366d64ada50SJens Schweikhardtunder a historic System V implementation. 36726bdc1d1STim J. RobbinsAdditionally, any scripts that depended on the sequence 36826bdc1d1STim J. Robbins.Dq Li a-z 36926bdc1d1STim J. Robbinsto 37026bdc1d1STim J. Robbinsrepresent the three characters 37126bdc1d1STim J. Robbins.Ql a , 3723baccdb9SRuslan Ermilov.Ql \- 37326bdc1d1STim J. Robbinsand 37426bdc1d1STim J. Robbins.Ql z 37526bdc1d1STim J. Robbinswill have to be 37626bdc1d1STim J. Robbinsrewritten as 37726bdc1d1STim J. Robbins.Dq Li a\e-z . 3789b50d902SRodney W. Grimes.Pp 3799b50d902SRodney W. GrimesThe 380af647767SPhilippe Charnier.Nm 3819b50d902SRodney W. Grimesutility has historically not permitted the manipulation of NUL bytes in 3829b50d902SRodney W. Grimesits input and, additionally, stripped NUL's from its input stream. 3839b50d902SRodney W. GrimesThis implementation has removed this behavior as a bug. 3849b50d902SRodney W. Grimes.Pp 3859b50d902SRodney W. GrimesThe 386af647767SPhilippe Charnier.Nm 3879b50d902SRodney W. Grimesutility has historically been extremely forgiving of syntax errors, 3889b50d902SRodney W. Grimesfor example, the 3899b50d902SRodney W. Grimes.Fl c 3909b50d902SRodney W. Grimesand 3919b50d902SRodney W. Grimes.Fl s 3929b50d902SRodney W. Grimesoptions were ignored unless two strings were specified. 3939b50d902SRodney W. GrimesThis implementation will not permit illegal syntax. 3949b50d902SRodney W. Grimes.Sh STANDARDS 3959b50d902SRodney W. GrimesThe 396af647767SPhilippe Charnier.Nm 397dfac4f36STim J. Robbinsutility conforms to 398dfac4f36STim J. Robbins.St -p1003.1-2001 . 3990414904dSRuslan ErmilovThe 4000414904dSRuslan Ermilov.Dq ideogram , 4010414904dSRuslan Ermilov.Dq phonogram , 4020414904dSRuslan Ermilov.Dq rune , 4030414904dSRuslan Ermilovand 4040414904dSRuslan Ermilov.Dq special 4050414904dSRuslan Ermilovcharacter classes are extensions. 406dfac4f36STim J. Robbins.Pp 4079b50d902SRodney W. GrimesIt should be noted that the feature wherein the last character of 4089b50d902SRodney W. Grimes.Ar string2 4099b50d902SRodney W. Grimesis duplicated if 4109b50d902SRodney W. Grimes.Ar string2 4119b50d902SRodney W. Grimeshas less characters than 4129b50d902SRodney W. Grimes.Ar string1 4139b50d902SRodney W. Grimesis permitted by POSIX but is not required. 4149b50d902SRodney W. GrimesShell scripts attempting to be portable to other POSIX systems should use 41526bdc1d1STim J. Robbinsthe 41626bdc1d1STim J. Robbins.Dq Li [#*] 41726bdc1d1STim J. Robbinsconvention instead of relying on this behavior. 41869bd8767SWolfgang HelbigThe 41969bd8767SWolfgang Helbig.Fl u 42069bd8767SWolfgang Helbigoption is an extension to the 421dfac4f36STim J. Robbins.St -p1003.1-2001 42269bd8767SWolfgang Helbigstandard. 423