tr
This command can be used to translate a set of characters to another. It reads from the standard input, finds for all the special characters and translates each into another specified character and writes to the standard output. tr cannot read/write from/to the files. Thus, the redirection symbols or pipe must be used to input to the tr command.
Syntax
tr string1 string2
In the given syntax string1, string2 are the translation control strings. Every string represents a set of characters to be converted into an array of characters used for the translation. Let Consider the following
# tr "123" "ABC" < mydata
As a output of executing tr, the subsequent translation takes place in the file mydata that is output on the terminal.
1 -> A
2-> B
3 -> C