tr command Assignment Help

Assignment Help: >> Filters - tr command

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

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd