In this video, we'll talk about tr.
TR is for translate. It translates sets of characters into other sets of characters.
It's useful for converting upper into lowercase or the other way around.
And here are a couple of examples which I'm just going to run for you.
So let's start by using echo hello, which normally is printing the text hello on the screen. And.
And now I'm sending it to TR to translate lowercase into uppercase.
And there we can see uppercase hello.
Now, lower to upper is much nicer than
the alternative, which is az, a colon Z.
Because this would only work in languages where you don't have special accents on
your letters, like umlaut in German, like CD in French and stuff like that.
That doesn't work if you just go for plain az uppercase az.
Now another one that is kind of funny.
If we look for am and we translate by nz, then here you go,
you can see that it has changed some of the characters in there.
That's what TR can do.
I like TR a lot because it allows you to convert into
all lowercase, which makes scripted operations a lot easier. For instance.