manpagez: man pages & more
info coreutils
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1.3 Squeezing repeats and deleting

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:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.