When given just the `--delete' (`-d') option, tr
removes any input characters that are in set1.
When given just the `--squeeze-repeats' (`-s') option,
tr
replaces each input sequence of a repeated character that
is in set1 with a single occurrence of that character.
When given both `--delete' and `--squeeze-repeats', tr
first performs any deletions using set1, then squeezes repeats
from any remaining characters using set2.
The `--squeeze-repeats' option may also be used when translating,
in which case tr
first performs translation, then squeezes
repeats from any remaining characters using set2.
Here are some examples to illustrate various combinations of options:
tr -d '\000'
tr -cs '[a-zA-Z0-9]' '[\n*]'
tr -s '\n'
Go to the first, previous, next, last section, table of contents.