Linux tr command

18,355

This is a comprehensive guide/explanation to using tr

Reference: http://www.thegeekstuff.com/2012/12/linux-tr-command/

The general syntax of tr is

 tr [options] set1 [set2]

The items in the square brackets are optional. tr requires at least one argument and accepts a maximum of two. The first, designated set1, lists the characters in the text to be replaced or removed. The second, set2, lists the characters that are to be substituted for the characters listed in the first argument.

Share:
18,355
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I'm stuck and hope someone can help. I am trying to use the tr command to capitalize the text of first two columns of a file but can't seem to figure it out. It's actually for an assignment for a class I am taking and I must use tr. Can anyone help?

    Thanks in advance