Advanced | Help | Encyclopedia
Directory


Tr (program)

The title of this article is incorrect because of technical limitations. The correct title is tr.

tr (abbreviated from translate or transliterate) is a command in Unix-like operating systems.

When executed, the program reads from the standard input and writes to the standard output. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set. The following inputs, for instance, (equivalent to tr abcdefghijklmnopqrstuvwxyz zabcdefghijklmnopqrstuvwxy) shift the input letters of the alphabet back by one character.

$ echo "ibm 9000" > computer.txt
$ tr [a-z] [za-y] < computer.txt
hal 9000

tr is an operator in Perl as well, which operates analogously.








Links: Addme | Keyword Research | Paid Inclusion | Femail | Software | Completive Intelligence

Add URL | About Slider | FREE Slider Toolbar - Simply Amazing
Copyright © 2000-2008 Slider.com. All rights reserved.
Content is distributed under the GNU Free Documentation License.