TR Command in Unix/Linux With Examples: $ TR (OPTION) SET1 (SET2)
TR Command in Unix/Linux With Examples: $ TR (OPTION) SET1 (SET2)
TR Command in Unix/Linux With Examples: $ TR (OPTION) SET1 (SET2)
examples
https://www.geeksforgeeks.org/tr-command-in-unix-linux-with-examples/
Syntax :
Options
Sample Commands
**$cat greekfile**
Output:
WELCOME TO
GeeksforGeeks
Output:
WELCOME TO
GEEKSFORGEEKS
or
**$cat geekfile | tr “[:lower:]” “[:upper:]”**
Output:
WELCOME TO
GEEKSFORGEEKS
Output:
Welcome To GeeksforGeeks
**$cat greekfile**
Output:
{WELCOME TO}
GeeksforGeeks
Output:
(WELCOME TO)
GeeksforGeeks
The above command will read each character from “geekfile.txt”, translate if it is a
brace, and write the output in “newfile.txt”.
Output:
Welcome To GeeksforGeeks
Output:
elcome To GeeksforGeeks
Output:
my ID is
Output:
73535
This article is contributed by Shivani Ghughtyal. If you like GeeksforGeeks and
would like to contribute, you can also write an article using
contribute.geeksforgeeks.org or mail your article to [email protected].
See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more
information about the topic discussed above.
Save