home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TR ST-UNIX User's Manual TR
-
-
-
- COMMAND
- tr - character translator.
-
- FORMAT
- tr [ -cds ] [ string1 [ string2 ] ]
-
- DESCRIPTION
- _✓T_✓r copies the standard input to the standard output substi-
- tuting or deleting selected characters. Characters found in
- _✓s_✓t_✓r_✓i_✓n_✓g_✓1 are mapped into the corresponding characters of
- _✓s_✓t_✓r_✓i_✓n_✓g_✓2, with _✓s_✓t_✓r_✓i_✓n_✓g_✓2 being padded with its last character
- to the same length as _✓s_✓t_✓r_✓i_✓n_✓g_✓1 if it is shorter.
-
- The -c option causes the complement of _✓s_✓t_✓r_✓i_✓n_✓g_✓1 in characters
- whose ASCII codes are 1 through 256 decimal. -d deletes all
- input characters in _✓s_✓t_✓r_✓i_✓n_✓g_✓1; -s squeezes all repeated output
- characters in _✓s_✓t_✓r_✓i_✓n_✓g_✓2 to single characters.
-
- In either string the notation _✓a-_✓b means a range of charac-
- ters from _✓a to _✓b in increasing ASCII order. The character
- `\' followed by 1, 2 or 3 octal digits stands for the char-
- acter whose ASCII code is given by those digits. A `\' fol-
- lowed by any other character stands for that character.
-
- 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 string of alphabetic characters.
-
- tr -cs A-Za-z '\012' <file1 >file2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Printed 28/March/1988 30 March 1987 1
-
-
-
-