 Okay, continuing our tutorials on basic shell script commands and usage. And in these tutorials I will, in most cases I'll be using bash as my shell if not I'll let you know. So a lot of what I teach should work in all shell environments, but I can't guarantee all. So just let you know that if something's not working it may be that you're not using bash as a shell environment. And today we're going to be looking at taking a string that's inside a variable. I'm not sure if I've gone over variables yet, but we'll quickly go over that here today. But string which is a group of letters or words. And then we're going to take them all and make everything inside that string either uppercase or lowercase. Now there's multiple ways to do this if you're writing a shell script. And there's all these external tools which I'll actually get into in later tutorials. But as much as possible it's a good idea to use your actual environment and what I mean by that is bash has built in tools and then there's external tools. If it's built into bash as long as it's a current version of bash everything should work on any bash system where these external tools you may not necessarily have installed. They'll probably be installed a lot of them by default on a regular desktop system. But if you're working on a Linux device like maybe a phone or something you may not have all the tools available but as long as they're built into bash and you're writing a current version of bash these internal tools should work. Hope that makes sense. If not maybe you'll understand once I show you how to do it. So first thing we're going to do is going to create a variable. Now a variable is just like in elementary school math where you had like the letter x and x represented a number. So like x equals 10 and at that point anywhere in an equation where x is you know that x has the value of 10. You can always just replace x with 10. So we're going to do that here and I'm going to say x equals and inside quotations I'm going to say hello world. Now your variable name which in this case is x could be pretty much anything you want within reasons. So it doesn't have to be one letter it could be a whole word. You want to avoid special characters and spaces and stuff like that but within reason you can use whatever you like and it's a good idea to name them so that you know what that variable represents. But I'm just going to say x equals hello world. Now in previous tutorials we said you could echo and then quotations type hello world and hit enter and it will print out on the screen hello world. But since we created the variable we can use that variable we can say echo the variable x. Now if we just put an x in here it's obviously just going to print out the letter x to tell bash or your shell that this is a variable we're using and not the letter x we're going to say dollar sign x. So echo dollar sign x and we get hello world because as we said earlier the variable x equals hello world. So that's fine and dandy we have hello world with a capital H and a capital W but let's say we want to make everything in it uppercase. Once again there's a number of ways to do this but as long as you're using bash I believe 4.0 or higher what you can do is say echo and then between the dollar sign and the x put these squiggly braces and then to convert that or print it out as all uppercase we can say the little carrot symbol twice. So hit enter there and we got echo and we echoed out hello world but as you can see unlike before which had some uppercase and lowercase everything in this is now uppercase going the other way and also I want to show you that if you echo x again we have not changed the value of x we just displayed it differently but the value of x is still hello world with the capital H and capital W and the rest of it lowercase. Now just like before but instead of the carrots we just do commas so two commas we can go echo and then inside our quotations dollar sign saying this is a variable and then the braces and we're going to special something special with this variable of x and we're going comma comma we'd enter and now you can see that we've echoed out hello world all lowercase and once again if we just echo out dollar sign x we get the original hello world with the capital H and capital W and the rest lowercase because at no point in this have we changed the value of x we're just displaying it differently also I mentioned in previous tutorials that you have a history when you're working in the shell unless it's disabled and you can use your arrow keys of up and down to go through previous commands that saves you a little bit of time in typing so I thought I'd go over this because in the next few tutorials we're going to start going over writing scripts and we're going to do things with if then statements and while loops and stuff like that and I'm going to be using this little technique of changing how the variable is displayed within that so I wanted to get this out of the way but I had people asking for if then statements which is the next logical place to go in learning so look forward to that coming up next couple days most likely so I thank you for watching please visit filmsbychrist.com that's Chris the K should be a link in the description and I just hope that you enjoy my tutorials and there'll be more to come be sure to subscribe and if you're liking these bash basic tutorials give this video a thumbs up so I know thanks again have a great day