📄 tr.1
字号:
.th TR I 5/20/74.sh NAMEtr \*- transliterate.sh SYNOPSIS.bd tr[.bd \*-cds] [ string1 [ string2 ] ].sh DESCRIPTION.it Trcopies the standard input to the standard output with substitution or deletion of selected characters.Input characters found in .it string1are mapped into the corresponding characters of.it string2.Any combination of the options.bd \*-cdsmay be used..bd \*-ccomplements the set of characters in.it string1with respect to the universe of characterswhose ascii codes are 001 through 377 octal..bd \*-ddeletes all input characters in.it string1..bd \*-ssqueezes all strings of repeated output characters that arein .it string2to single characters..s3The following abbreviation conventions may be usedto introduce ranges of characters or repeated characters intothe strings:.s3\fB[\fIa\*|\fB\*-\fIb\fB\*|]\fRstands for the string of characters whose ascii codes runfrom character.it ato character.it b..s3\fB[\fIa\fB\*|*\fIn\fB\*|]\fR,where.it nis an integer or empty, stands for \fIn\fR-fold repetition of character.it a..it nis taken to be octal or decimal according as itsfirst digit is or is not zero.A zero or missing.it nis taken to be huge;this facility is useful for padding.it string2..s3The escape character `\\' may be used as in.it shto remove special meaning from any character in a string.In addition,`\\' followed by 1, 2 or 3 octal digits stands for thecharacter whose ascii code is given by those digits..s3The following example creates a list of allthe words in `file1' one per line in `file2',where a word is taken to be a maximal string of alphabetics.The strings are quotedto protect the special characters from interpretation by the Shell;012 is the ascii code for newline..s3.ti +8tr \*-cs "[A\*-Z][a\*-z]" "[\\012*]" <file1 >file2.sh "SEE ALSO"sh (I), ed (I), ascii (V).sh BUGSWon't handle ascii NUL in.it string1or.it string2;always deletes NUL from input.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -