[prev] [index] [next]

tr: transliterate characters (cont)

Examples:

# map all upper-case letters to lower-case equivalents
tr 'A-Z' 'a-z' < text

# simple encryption (a->b, b->c, ... z->a)
tr 'a-zA-Z' 'b-zaB-ZA' < text

# remove all digits from input
tr -d '0-9' < text

# break text file into individual words, one per line
tr -cs 'a-zA-Z0-9' '\n' < text