 Okay, in a lot of my videos we've used the cut command to cut things up. Here's an example. I'll say echo File.txt whatever just something in there and I can say cut with a delimiter of a period and I can say field one Which would be basically if these were columns. This would be field One here since we're dividing by the period and this would be field two So I can press enter there and you can see we get file if I do field two we get txt and of course you can do more you can say dot zero zero one and Still if I do field two I Get txt if I go to three I get the zero zero one. So we're just dividing it up by the period there We're using cut which is Probably on almost all systems. You're going to use it's a fairly common tool But when can it's always a good idea to maybe use internal tools and since we're writing the bash scripts here bash and I believe this will work and a few other shells as well Probably not the standard shell in fact will test that at the end of the video if I remember You can use the built-in commands to divide it up. This is slightly more efficient You're not going to be calling the new process. You're you're doing it with the built-in command here And but if you're on a real slim down system, maybe cuts not available But you have bash you can still do this Once again, we'll test that on a standard shell Which if you have a real slim down system is probably what you'll be running anyway But anyway, I'm going to show you this whatever reason you decide to use it is up to you But and I've shown you similar stuff before but I don't think I've shown you exactly this First we'll take the string instead of that going we're going to create a variable So I'll just say x equals File dot txt So now I can say echo Dollar sign x and we get file dot txt because that string is now in that variable But if I wanted to I can say echo dollar sign and inside curly braces give it the variable of x and What we could do here is we can say percent percent backslash dot Txt it hit enter and we get file basically we're saying here Show us everything before dot txt If we were to do this without the dot txt, we still get the whole thing because it's looking for You know the end basically we're not dividing it we're saying look at the end of this file find it It's basically split it in half So we could always say if we don't know what the extension is going to be or what's after the dot Give it an asterisk and we'll get the file Alternatively if we need the second half we can say pound pound percent And we'll hit backslash dot and we get everything after the dots So we're saying look here for everything Before the slash we could also I believe put file in there and we get the same thing If we remove that all together we still get the whole file name because we're not giving it any parameters for the first half now also If we do this again, we'll say everything before the dot we get or everything. Sorry remove everything before the dot We're gonna get everything after the dot if we Do about remove the dots it's going to get confused. So make sure you put the dot in there So we looked at cutting the front and the back off now let's let's go into our standard shell here and And try running the same thing So we'll say well first we have to create the variable because if we try to echo dollar sign x at this point We don't get anything because we haven't set that variable in this particular shell So we'll say x equals file dot txt and now we'll say echo Dollar sign our braces oh That's right. The arrow keys aren't going to work in this shell So we got to type everything out as we go as far as I know if you know a little tip on that go ahead Let me know. I'm sure there probably is we're gonna say remove everything before the dot and We'll hit enter. Oh, it does work in the shell. I didn't think it was going to so that's good to know So definitely if you're on a stripped down system Maybe a small arm device and maybe you don't have cut available But you have a standard shell At least with the version of the shell. I'm running right now It does work. So that's just splitting strings in half You know front or end Just with built-in commands inside our shell. So anyway, I thank you for watching. I hope you found this tutorial useful You know feel free to question and comment below if you know other techniques or places This will and will not work feel free to comment below. Please visit my website films by Chris calm That's Chris for the K. There should be a link in the description and I hope that you have a great