ttrr -- Command

Translate characters
ttrr [-ccddss] _s_t_r_i_n_g_1 [_s_t_r_i_n_g_2]

ttrr reads  characters from the  standard input, possibly  translates each to
another value or deletes it, and writes to standard output.

Each specified  _s_t_r_i_n_g may contain literal  characters of the form  _a or \_b
(where _b  is non-numeric), octal representations of the  form \_o_o_o (where _o
is an octal digit), and character  ranges of the form _X-_Y. ttrr rewrites each
_s_t_r_i_n_g with the appropriate conversions and range expansions.

If an input character is in _s_t_r_i_n_g_1, ttrr outputs the corresponding character
of _s_t_r_i_n_g_2.  If _s_t_r_i_n_g_2  is shorter  than _s_t_r_i_n_g_1, the  result is  the last
character in _s_t_r_i_n_g_2.

The following flags control how ttrr translates characters:

-cc Replace _s_t_r_i_n_g_1 by the set of characters not in _s_t_r_i_n_g_1.

-dd Delete characters in _s_t_r_i_n_g_1 rather than translating them.

-ss The  ``squeeze''  option: map  a  sequence of  the  same character  from
   _s_t_r_i_n_g_1 to one output character.

_E_x_a_m_p_l_e
The  following example  prints  all sequences  of  four or  more spaces  or
printing characters from iinnffiillee:

    tr -cs ' -~' '\12' <infile | grep ....

Here _s_t_r_i_n_g_1 is the range from  <ssppaaccee> to `~', which includes all printing
characters.  Because this example uses  the flags -ccss, ttrr maps sequences of
nonprinting characters to newline (octal 12).

_S_e_e _A_l_s_o
AASSCCIIII, ccoommmmaannddss, ccttyyppee.hh, sseedd

_N_o_t_e_s
Beginning with COHERENT 4.2, the command

    echo "This is a test." | tr

returns

    This is a test.

This behavior does not conform with  the POSIX Standard, but is required by
a number of third-party packages.
