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. 159b50d902SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 169b50d902SRodney W. Grimes.\" must display the following acknowledgement: 179b50d902SRodney W. Grimes.\" This product includes software developed by the University of 189b50d902SRodney W. Grimes.\" California, Berkeley and its contributors. 199b50d902SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 209b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 219b50d902SRodney W. Grimes.\" without specific prior written permission. 229b50d902SRodney W. Grimes.\" 239b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 249b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 259b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 269b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 279b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 289b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 299b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 309b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 319b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 329b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 339b50d902SRodney W. Grimes.\" SUCH DAMAGE. 349b50d902SRodney W. Grimes.\" 359b50d902SRodney W. Grimes.\" @(#)tr.1 8.1 (Berkeley) 6/6/93 36c3aac50fSPeter Wemm.\" $FreeBSD$ 379b50d902SRodney W. Grimes.\" 380b651019STim J. Robbins.Dd July 23, 2004 399b50d902SRodney W. Grimes.Dt TR 1 409b50d902SRodney W. Grimes.Os 419b50d902SRodney W. Grimes.Sh NAME 429b50d902SRodney W. Grimes.Nm tr 439b50d902SRodney W. Grimes.Nd translate characters 449b50d902SRodney W. Grimes.Sh SYNOPSIS 458fe908efSRuslan Ermilov.Nm 46dfac4f36STim J. Robbins.Op Fl Ccsu 479b50d902SRodney W. Grimes.Ar string1 string2 488fe908efSRuslan Ermilov.Nm 49dfac4f36STim J. Robbins.Op Fl Ccu 509b50d902SRodney W. Grimes.Fl d 519b50d902SRodney W. Grimes.Ar string1 528fe908efSRuslan Ermilov.Nm 53dfac4f36STim J. Robbins.Op Fl Ccu 549b50d902SRodney W. Grimes.Fl s 559b50d902SRodney W. Grimes.Ar string1 568fe908efSRuslan Ermilov.Nm 57dfac4f36STim J. Robbins.Op Fl Ccu 589b50d902SRodney W. Grimes.Fl ds 599b50d902SRodney W. Grimes.Ar string1 string2 609b50d902SRodney W. Grimes.Sh DESCRIPTION 619b50d902SRodney W. GrimesThe 62af647767SPhilippe Charnier.Nm 639b50d902SRodney W. Grimesutility copies the standard input to the standard output with substitution 649b50d902SRodney W. Grimesor deletion of selected characters. 659b50d902SRodney W. Grimes.Pp 669b50d902SRodney W. GrimesThe following options are available: 679b50d902SRodney W. Grimes.Bl -tag -width Ds 68dfac4f36STim J. Robbins.It Fl C 69dfac4f36STim J. RobbinsComplement the set of characters in 709b50d902SRodney W. Grimes.Ar string1 , 71dfac4f36STim J. Robbinsthat is 7206e482e6SRuslan Ermilov.Dq Fl C Li ab 73dfac4f36STim J. Robbinsincludes every character except for 7406e482e6SRuslan Ermilov.Ql a 75dfac4f36STim J. Robbinsand 7606e482e6SRuslan Ermilov.Ql b . 77dfac4f36STim J. Robbins.It Fl c 78dfac4f36STim J. RobbinsSame as 79dfac4f36STim J. Robbins.Fl C 80e263a4b4STim J. Robbinsbut complement the set of values in 81dfac4f36STim J. Robbins.Ar string1 . 829b50d902SRodney W. Grimes.It Fl d 836eb0710eSTim J. RobbinsDelete characters in 846eb0710eSTim J. Robbins.Ar string1 856eb0710eSTim J. Robbinsfrom the input. 869b50d902SRodney W. Grimes.It Fl s 876eb0710eSTim J. RobbinsSqueeze multiple occurrences of the characters listed in the last 889b50d902SRodney W. Grimesoperand (either 899b50d902SRodney W. Grimes.Ar string1 909b50d902SRodney W. Grimesor 919b50d902SRodney W. Grimes.Ar string2 ) 929b50d902SRodney W. Grimesin the input into a single instance of the character. 939b50d902SRodney W. GrimesThis occurs after all deletion and translation is completed. 9469bd8767SWolfgang Helbig.It Fl u 956eb0710eSTim J. RobbinsGuarantee that any output is unbuffered. 969b50d902SRodney W. Grimes.El 979b50d902SRodney W. Grimes.Pp 989b50d902SRodney W. GrimesIn the first synopsis form, the characters in 999b50d902SRodney W. Grimes.Ar string1 1009b50d902SRodney W. Grimesare translated into the characters in 1019b50d902SRodney W. Grimes.Ar string2 1029b50d902SRodney W. Grimeswhere the first character in 1039b50d902SRodney W. Grimes.Ar string1 1049b50d902SRodney W. Grimesis translated into the first character in 1059b50d902SRodney W. Grimes.Ar string2 1069b50d902SRodney W. Grimesand so on. 1079b50d902SRodney W. GrimesIf 1089b50d902SRodney W. Grimes.Ar string1 1099b50d902SRodney W. Grimesis longer than 1109b50d902SRodney W. Grimes.Ar string2 , 1119b50d902SRodney W. Grimesthe last character found in 1129b50d902SRodney W. Grimes.Ar string2 1139b50d902SRodney W. Grimesis duplicated until 1149b50d902SRodney W. Grimes.Ar string1 1159b50d902SRodney W. Grimesis exhausted. 1169b50d902SRodney W. Grimes.Pp 1179b50d902SRodney W. GrimesIn the second synopsis form, the characters in 1189b50d902SRodney W. Grimes.Ar string1 1199b50d902SRodney W. Grimesare deleted from the input. 1209b50d902SRodney W. Grimes.Pp 1219b50d902SRodney W. GrimesIn the third synopsis form, the characters in 1229b50d902SRodney W. Grimes.Ar string1 1239b50d902SRodney W. Grimesare compressed as described for the 1249b50d902SRodney W. Grimes.Fl s 1259b50d902SRodney W. Grimesoption. 1269b50d902SRodney W. Grimes.Pp 1279b50d902SRodney W. GrimesIn the fourth synopsis form, the characters in 1289b50d902SRodney W. Grimes.Ar string1 1299b50d902SRodney W. Grimesare deleted from the input, and the characters in 1309b50d902SRodney W. Grimes.Ar string2 1319b50d902SRodney W. Grimesare compressed as described for the 1329b50d902SRodney W. Grimes.Fl s 1339b50d902SRodney W. Grimesoption. 1349b50d902SRodney W. Grimes.Pp 1359b50d902SRodney W. GrimesThe following conventions can be used in 1369b50d902SRodney W. Grimes.Ar string1 1379b50d902SRodney W. Grimesand 1389b50d902SRodney W. Grimes.Ar string2 1399b50d902SRodney W. Grimesto specify sets of characters: 1409b50d902SRodney W. Grimes.Bl -tag -width [:equiv:] 1419b50d902SRodney W. Grimes.It character 1429b50d902SRodney W. GrimesAny character not described by one of the following conventions 1439b50d902SRodney W. Grimesrepresents itself. 1449b50d902SRodney W. Grimes.It \eoctal 1459b50d902SRodney W. GrimesA backslash followed by 1, 2 or 3 octal digits represents a character 1469b50d902SRodney W. Grimeswith that encoded value. 1479b50d902SRodney W. GrimesTo follow an octal sequence with a digit as a character, left zero-pad 1489b50d902SRodney W. Grimesthe octal sequence to the full 3 octal digits. 1499b50d902SRodney W. Grimes.It \echaracter 1509b50d902SRodney W. GrimesA backslash followed by certain special characters maps to special 1519b50d902SRodney W. Grimesvalues. 152726b61abSRuslan Ermilov.Pp 1539597e1c2SRuslan Ermilov.Bl -column "\ea" 1549b88faecSRuslan Ermilov.It "\ea <alert character> 1559b88faecSRuslan Ermilov.It "\eb <backspace> 1569b88faecSRuslan Ermilov.It "\ef <form-feed> 1579b88faecSRuslan Ermilov.It "\en <newline> 1589b88faecSRuslan Ermilov.It "\er <carriage return> 1599b88faecSRuslan Ermilov.It "\et <tab> 1609b88faecSRuslan Ermilov.It "\ev <vertical tab> 1619b50d902SRodney W. Grimes.El 162726b61abSRuslan Ermilov.Pp 1639b50d902SRodney W. GrimesA backslash followed by any other character maps to that character. 1649b50d902SRodney W. Grimes.It c-c 16521f53e91SAndrey A. ChernovFor non-octal range endpoints 16621f53e91SAndrey A. Chernovrepresents the range of characters between the range endpoints, inclusive, 167a508a04dSAndrey A. Chernovin ascending order, 168a508a04dSAndrey A. Chernovas defined by the collation sequence. 16921f53e91SAndrey A. ChernovIf either or both of the range endpoints are octal sequences, it 17021f53e91SAndrey A. Chernovrepresents the range of specific coded values between the 17121f53e91SAndrey A. Chernovrange endpoints, inclusive. 1720b651019STim J. Robbins.Pp 1730b651019STim J. Robbins.Bf Em 1740b651019STim J. RobbinsSee the COMPATIBILITY section below for an important note regarding 1750b651019STim J. Robbinsdifferences in the way the current 1760b651019STim J. Robbinsimplementation interprets range expressions differently from 1770b651019STim J. Robbinsprevious implementations. 1780b651019STim J. Robbins.Ef 1799b50d902SRodney W. Grimes.It [:class:] 1809b50d902SRodney W. GrimesRepresents all characters belonging to the defined character class. 1819b50d902SRodney W. GrimesClass names are: 182726b61abSRuslan Ermilov.Pp 1839597e1c2SRuslan Ermilov.Bl -column "xdigit" 1849b88faecSRuslan Ermilov.It "alnum <alphanumeric characters> 1859b88faecSRuslan Ermilov.It "alpha <alphabetic characters> 1869b88faecSRuslan Ermilov.It "cntrl <control characters> 1879b88faecSRuslan Ermilov.It "digit <numeric characters> 1889b88faecSRuslan Ermilov.It "graph <graphic characters> 1899b88faecSRuslan Ermilov.It "lower <lower-case alphabetic characters> 1909b88faecSRuslan Ermilov.It "print <printable characters> 1919b88faecSRuslan Ermilov.It "punct <punctuation characters> 1929b88faecSRuslan Ermilov.It "space <space characters> 1939b88faecSRuslan Ermilov.It "upper <upper-case characters> 1949b88faecSRuslan Ermilov.It "xdigit <hexadecimal characters> 1959b50d902SRodney W. Grimes.El 1969b50d902SRodney W. Grimes.Pp 1979b88faecSRuslan Ermilov.\" All classes may be used in 1989b88faecSRuslan Ermilov.\" .Ar string1 , 1999b88faecSRuslan Ermilov.\" and in 2009b88faecSRuslan Ermilov.\" .Ar string2 2019b88faecSRuslan Ermilov.\" when both the 2029b88faecSRuslan Ermilov.\" .Fl d 2039b88faecSRuslan Ermilov.\" and 2049b88faecSRuslan Ermilov.\" .Fl s 2059b88faecSRuslan Ermilov.\" options are specified. 2069b88faecSRuslan Ermilov.\" Otherwise, only the classes ``upper'' and ``lower'' may be used in 2079b88faecSRuslan Ermilov.\" .Ar string2 2089b88faecSRuslan Ermilov.\" and then only when the corresponding class (``upper'' for ``lower'' 2099b88faecSRuslan Ermilov.\" and vice-versa) is specified in the same relative position in 2109b88faecSRuslan Ermilov.\" .Ar string1 . 2119b88faecSRuslan Ermilov.\" .Pp 21226bdc1d1STim J. RobbinsWhen 21326bdc1d1STim J. Robbins.Dq Li [:lower:] 21426bdc1d1STim J. Robbinsappears in 215bc44c44aSAndrey A. Chernov.Ar string1 21626bdc1d1STim J. Robbinsand 21726bdc1d1STim J. Robbins.Dq Li [:upper:] 21826bdc1d1STim J. Robbinsappears in the same relative position in 219bc44c44aSAndrey A. Chernov.Ar string2 , 2208ad968eeSAndrey A. Chernovit represents the characters pairs from the 221bc44c44aSAndrey A. Chernov.Dv toupper 222bc44c44aSAndrey A. Chernovmapping in the 223bc44c44aSAndrey A. Chernov.Ev LC_CTYPE 224bc44c44aSAndrey A. Chernovcategory of the current locale. 22526bdc1d1STim J. RobbinsWhen 22626bdc1d1STim J. Robbins.Dq Li [:upper:] 22726bdc1d1STim J. Robbinsappears in 228bc44c44aSAndrey A. Chernov.Ar string1 22926bdc1d1STim J. Robbinsand 23026bdc1d1STim J. Robbins.Dq Li [:lower:] 23126bdc1d1STim J. Robbinsappears in the same relative position in 232bc44c44aSAndrey A. Chernov.Ar string2 , 2338ad968eeSAndrey A. Chernovit represents the characters pairs from the 234bc44c44aSAndrey A. Chernov.Dv tolower 235bc44c44aSAndrey A. Chernovmapping in the 236bc44c44aSAndrey A. Chernov.Ev LC_CTYPE 237bc44c44aSAndrey A. Chernovcategory of the current locale. 238bc44c44aSAndrey A. Chernov.Pp 2398ad968eeSAndrey A. ChernovWith the exception of case conversion, 2408ad968eeSAndrey A. Chernovcharacters in the classes are in unspecified order. 2419b50d902SRodney W. Grimes.Pp 242b9a86ec9SPhilippe CharnierFor specific information as to which 243b9a86ec9SPhilippe Charnier.Tn ASCII 244b9a86ec9SPhilippe Charniercharacters are included 2459b50d902SRodney W. Grimesin these classes, see 2469b50d902SRodney W. Grimes.Xr ctype 3 2479b50d902SRodney W. Grimesand related manual pages. 2489b50d902SRodney W. Grimes.It [=equiv=] 24985f6c317STim J. RobbinsRepresents all characters belonging to the same equivalence class as 25085f6c317STim J. Robbins.Ar equiv , 25185f6c317STim J. Robbinsordered by their encoded values. 2529b50d902SRodney W. Grimes.It [#*n] 2539b50d902SRodney W. GrimesRepresents 2549b50d902SRodney W. Grimes.Ar n 2559b50d902SRodney W. Grimesrepeated occurrences of the character represented by 2569b50d902SRodney W. Grimes.Ar # . 2579b50d902SRodney W. GrimesThis 2589b50d902SRodney W. Grimesexpression is only valid when it occurs in 2599b50d902SRodney W. Grimes.Ar string2 . 2609b50d902SRodney W. GrimesIf 2619b50d902SRodney W. Grimes.Ar n 2629b50d902SRodney W. Grimesis omitted or is zero, it is be interpreted as large enough to extend 2639b50d902SRodney W. Grimes.Ar string2 2649b50d902SRodney W. Grimessequence to the length of 2659b50d902SRodney W. Grimes.Ar string1 . 2669b50d902SRodney W. GrimesIf 2679b50d902SRodney W. Grimes.Ar n 2689b50d902SRodney W. Grimeshas a leading zero, it is interpreted as an octal value, otherwise, 2699b50d902SRodney W. Grimesit's interpreted as a decimal value. 2709b50d902SRodney W. Grimes.El 27185f6c317STim J. Robbins.Sh ENVIRONMENT 27285f6c317STim J. RobbinsThe 27306e482e6SRuslan Ermilov.Ev LANG , LC_ALL , LC_CTYPE 27485f6c317STim J. Robbinsand 27585f6c317STim J. Robbins.Ev LC_COLLATE 27685f6c317STim J. Robbinsenvironment variables affect the execution of 27785f6c317STim J. Robbins.Nm 27885f6c317STim J. Robbinsas described in 27985f6c317STim J. Robbins.Xr environ 7 . 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 2950b651019STim J. Robbins.Ql "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" 3066eb0710eSTim J. Robbins.Sh DIAGNOSTICS 3076eb0710eSTim J. Robbins.Ex -std 3089b50d902SRodney W. Grimes.Sh COMPATIBILITY 3090b651019STim J. RobbinsPrevious 3100b651019STim J. Robbins.Fx 3110b651019STim J. Robbinsimplementations of 3120b651019STim J. Robbins.Nm 3130b651019STim J. Robbinsdid not order characters in range expressions according to the current 3140b651019STim J. Robbinslocale's collation order, making it possible to convert unaccented Latin 3150b651019STim J. Robbinscharacters (esp. as found in English text) from upper to lower case using 3160b651019STim J. Robbinsthe traditional 3170b651019STim J. Robbins.Ux 3180b651019STim J. Robbinsidiom of 3190b651019STim J. Robbins.Ql "tr A-Z a-z" . 3200b651019STim J. RobbinsSince 3210b651019STim J. Robbins.Nm 3220b651019STim J. Robbinsnow obeys the locale's collation order, this idiom may not produce 3230b651019STim J. Robbinscorrect results when there is not a 1:1 mapping between lower and 3240b651019STim J. Robbinsupper case, or when the order of characters within the two cases differs. 3250b651019STim J. RobbinsAs noted in the 3260b651019STim J. Robbins.Sx EXAMPLES 3270b651019STim J. Robbinssection above, the character class expressions 3280b651019STim J. Robbins.Ql "[:lower:]" 3290b651019STim J. Robbinsand 3300b651019STim J. Robbins.Ql "[:upper:]" 3310b651019STim J. Robbinsshould be used instead of explicit character ranges like 3320b651019STim J. Robbins.Ql "a-z" 3330b651019STim J. Robbinsand 3340b651019STim J. Robbins.Ql "A-Z" . 3350b651019STim J. Robbins.Pp 3369b50d902SRodney W. GrimesSystem V has historically implemented character ranges using the syntax 33726bdc1d1STim J. Robbins.Dq Li [c-c] 33826bdc1d1STim J. Robbinsinstead of the 33926bdc1d1STim J. Robbins.Dq Li c-c 34026bdc1d1STim J. Robbinsused by historic 341753d686dSRuslan Ermilov.Bx 342753d686dSRuslan Ermilovimplementations and 3439b50d902SRodney W. Grimesstandardized by POSIX. 3449b50d902SRodney W. GrimesSystem V shell scripts should work under this implementation as long as 3456a3e8b0aSRuslan Ermilovthe range is intended to map in another range, i.e., the command 34626bdc1d1STim J. Robbins.Dq Li "tr [a-z] [A-Z]" 34726bdc1d1STim J. Robbinswill work as it will map the 34826bdc1d1STim J. Robbins.Ql \&[ 34926bdc1d1STim J. Robbinscharacter in 3509b50d902SRodney W. Grimes.Ar string1 35126bdc1d1STim J. Robbinsto the 35226bdc1d1STim J. Robbins.Ql \&[ 35326bdc1d1STim J. Robbinscharacter in 3549b50d902SRodney W. Grimes.Ar string2 . 3559b50d902SRodney W. GrimesHowever, if the shell script is deleting or squeezing characters as in 35626bdc1d1STim J. Robbinsthe command 35726bdc1d1STim J. Robbins.Dq Li "tr -d [a-z]" , 35826bdc1d1STim J. Robbinsthe characters 35926bdc1d1STim J. Robbins.Ql \&[ 36026bdc1d1STim J. Robbinsand 36126bdc1d1STim J. Robbins.Ql \&] 36226bdc1d1STim J. Robbinswill be 3639b50d902SRodney W. Grimesincluded in the deletion or compression list which would not have happened 364d64ada50SJens Schweikhardtunder a historic System V implementation. 36526bdc1d1STim J. RobbinsAdditionally, any scripts that depended on the sequence 36626bdc1d1STim J. Robbins.Dq Li a-z 36726bdc1d1STim J. Robbinsto 36826bdc1d1STim J. Robbinsrepresent the three characters 36926bdc1d1STim J. Robbins.Ql a , 37026bdc1d1STim J. Robbins.Ql \&- 37126bdc1d1STim J. Robbinsand 37226bdc1d1STim J. Robbins.Ql z 37326bdc1d1STim J. Robbinswill have to be 37426bdc1d1STim J. Robbinsrewritten as 37526bdc1d1STim J. Robbins.Dq Li a\e-z . 3769b50d902SRodney W. Grimes.Pp 3779b50d902SRodney W. GrimesThe 378af647767SPhilippe Charnier.Nm 3799b50d902SRodney W. Grimesutility has historically not permitted the manipulation of NUL bytes in 3809b50d902SRodney W. Grimesits input and, additionally, stripped NUL's from its input stream. 3819b50d902SRodney W. GrimesThis implementation has removed this behavior as a bug. 3829b50d902SRodney W. Grimes.Pp 3839b50d902SRodney W. GrimesThe 384af647767SPhilippe Charnier.Nm 3859b50d902SRodney W. Grimesutility has historically been extremely forgiving of syntax errors, 3869b50d902SRodney W. Grimesfor example, the 3879b50d902SRodney W. Grimes.Fl c 3889b50d902SRodney W. Grimesand 3899b50d902SRodney W. Grimes.Fl s 3909b50d902SRodney W. Grimesoptions were ignored unless two strings were specified. 3919b50d902SRodney W. GrimesThis implementation will not permit illegal syntax. 3929b50d902SRodney W. Grimes.Sh STANDARDS 3939b50d902SRodney W. GrimesThe 394af647767SPhilippe Charnier.Nm 395dfac4f36STim J. Robbinsutility conforms to 396dfac4f36STim J. Robbins.St -p1003.1-2001 . 397dfac4f36STim J. Robbins.Pp 3989b50d902SRodney W. GrimesIt should be noted that the feature wherein the last character of 3999b50d902SRodney W. Grimes.Ar string2 4009b50d902SRodney W. Grimesis duplicated if 4019b50d902SRodney W. Grimes.Ar string2 4029b50d902SRodney W. Grimeshas less characters than 4039b50d902SRodney W. Grimes.Ar string1 4049b50d902SRodney W. Grimesis permitted by POSIX but is not required. 4059b50d902SRodney W. GrimesShell scripts attempting to be portable to other POSIX systems should use 40626bdc1d1STim J. Robbinsthe 40726bdc1d1STim J. Robbins.Dq Li [#*] 40826bdc1d1STim J. Robbinsconvention instead of relying on this behavior. 40969bd8767SWolfgang HelbigThe 41069bd8767SWolfgang Helbig.Fl u 41169bd8767SWolfgang Helbigoption is an extension to the 412dfac4f36STim J. Robbins.St -p1003.1-2001 41369bd8767SWolfgang Helbigstandard. 414