 Okay, today we're going to be working in bash. We're going to reverse or change the case of characters in a string. So let's go ahead and create a variable. I'll call it name and I'll put my name in there, Chris, okay? And now I can echo out dollar sign name and it says my name. I can also put it in these braces here and it echoes it out the same. But inside those braces, if I was to give it two carrot symbols after that, it will capitalize the entire string. If I was to give it commas, it would lowercase the entire string. And if I was to give it two little till days here, it will invert the case. So it's the K that was capitalized became lowercase and all the lowercase layers became capital. Now I do want to say that this is for bash and bash only it's built in. So for example, if I was to look at this, which is Z shell, you can see that we get bad substitution. It does not recognize that. I also tested it in busybox, busybox, same thing. The busybox shell does not like these substitutions. So be aware of that. So it's nice that this is built in, but it's not going to be able to run. If you run this in a script and a system that doesn't have bash and maybe uses busybox, it's not going to work. In that case, you might want to do something like with TR. So I could go echo my name. And if I pipe that into TR and I say A dash Z and then capital A dash Z, that will convert everything to uppercase and I can always reverse that. Now the drawback of this is that you are using an external tool, but it is a common external tool. So again, on lightweight systems that run busybox, if I was to run busybox here to list out all the commands, we should see that TR should be right there. It is built into TR. So it all depends on whether you want to stick built in. Some people are bash purists. They want to do this, which I think is great, but then a lot of lightweight systems, you can always put bash on there, but usually you'll have busybox or some other shell where you might have to pipe it into another tool or at least need to pipe into another tool to be cross-compatible. So why would you want to do this? There's a number of reasons, but one would be comparing strings. Let's go ahead and create a script. So I'm just going to call this name.sh and I'm going to use Vim as my text editor, but you use whatever text editor you like. I'm going to give the shebang line saying that this is a bash script, and I'm going to create a variable called name, and again, I'm going to put my name in there. And then I'm going to get user input. So I'm going to do read P, I'm going to say, please enter your name, and I'm going to put that into a variable called R for response. So now I can go like this. I can say dollar sign R. Does dollar sign R equal dollar sign name? And then we're going to say, if that's true, then echo hello, and if it's false, echo bye. Let's put that in parentheses just to be proper about it. And again, this is shorthand for if, then statement, but let's go ahead and change that so it's executable. And if I typed everything properly, it will ask me to enter my name. And if I type in Chris, it should say hello, but if I was to say Bob, it's going to say bye. And if I was to say Chris all lowercase, it's going to say bye because it doesn't match. So what we could do inside this script, we can come here and we can do like so. We can say, OK, brace expansions, and we can make it all capital or lowercase. It doesn't matter as long as we do the same over here. So now you just made your script case and set it. So I can say Chris with the capital K, but I can also say Chris with lowercase or I can say Chris with the capital K and the capital S. But if I was to again type in Bob, it's going to say bye. So that would be one case scenario where you want to use it when you're going to compare strings, you want to make sure that the cases match. And this is not the only way to do this, but it's a quick and easy way to do it in a bash script is just convert the cases all to either upcase or lowcase and then compare. I hope you found this useful. Please visit filmsbychris.com. That's Chris the K. There's a link in the description to my website. And I hope that you have a great day.