tr

From RaySoft

tr is a command in Unix-like operating systems. It is an abbreviation of translate or transliterate, indicating its operation of replacing or removing specific characters in its input data set.[1]

Documentation

Syntax

tr [PARAMETER ...] [SET ...]

Parameters

-c, -C, --complement
Use the complement of SET1.
-d, --delete
Delete characters in SET1, do not translate.

Examples

Translate the text to upper-case.
tr '[:lower:]' '[:upper:]' <<<'Example Text'
Get calender week
date '+KW %-V' | tr -d '\n'

Output:

KW 8

References