May 2000
Beginner
761 pages
18h 20m
English
tr [ –cds ] [ string1 [ string2 ] ]
tr copies the standard input to the standard output with substitution or deletion of selected characters. Input characters found in string1 are mapped into the corresponding characters of string2. The forward slash can be used with an octal digit to represent the ASCII code. When string2 (with any repetitions of characters) contains fewer characters than string1, characters in string1 with no corresponding character in string2 are not translated. Octal values for characters may be used when preceded with a backslash:
\11 Tab \12 New line \042 Single quote \047 Double quote
1 tr 'A' 'B' < filex 2 tr '[A-Z]' '[a-z]' < filex 3 tr -d ' ' < filex 4 tr -s '\11' '\11' ... |
Read now
Unlock full access