tr \- translate characters
] [ string1 [ string2 ] ]
copies the standard input to the standard output with
substitution or deletion of selected characters.
Input characters found in
are mapped into the corresponding characters of
is short it is padded to the length of
by duplicating its last character.
Any combination of the options
complements the set of characters in
with respect to the universe of characters
whose ASCII codes are 01 through 0377 octal;
deletes all input characters in
squeezes all strings of repeated output characters that are
In either string the notation
means a range of characters from
in increasing ASCII order.
`\e' followed by 1, 2 or 3 octal digits stands for the
character whose ASCII code is given by those digits.
A `\e' followed by any other character stands
The following example creates a list of all
the words in `file1' one per line in `file2',
where a word is taken to be a maximal string of alphabetics.
The second string is quoted
to protect `\e' from the Shell.
012 is the ASCII code for newline.
tr \-cs A\-Za\-z \'\e012\' <file1 >file2
Won't handle ASCII NUL in
always deletes NUL from input.