tr <string1> [string2]

Translate characters

Arguments

NameDescription
string1Candidate string
string2Replacment string

Options

NameDescription
-CComplement the set of characters in string1, that is '-C ab' includes every character except for 'a' and 'b'
-cSame as '-C' but complement the set of values in string1
-dDelete characters in string1 from the input
-sSqueeze multiple occurrences of the characters listed in the last operand (either string1 or string2) in the input into a single instance of the character. This occurs after all deletion and translation is completed
-uGuarantee that any output is unbuffered