 Okay, today we are going to be taking a text file and moving the last character of each line using said. So let's go ahead and jump into our Linux shell here and get modifying that file. Okay, right here in this folder, I have a file called file.txt. If I cat that out so you can see what's in there, you can see it's got three lines, each ending in a period. Now, I could, if I just wanted to get rid of those periods, I could do something like cat that into tr and say dash d and say remove all periods or dots and it did do that. The issue is if I wanted to just remove the last dot, so let's say I was to come in here and just add another dot here and I don't want to get rid of that one, doing this would get rid of that period right there as you can see. So again, this is without that and then you can see that there is supposed to be a dot there. So how do we move just the last character? Well, if I was to use said, I can say said and I can use the replace function. So here I'm gonna replace something. What am I gonna replace? I'm gonna say dot dollar sign and then our file name. And you can see right here, it has now removed that last dot. Not every dot, just the last dot last character. It's not just removing dots. So I might think you're looking at this, go oh, dollar sign means the end of the line and this is a dot, so it's removing all dots at the end of lines. No, what it's doing is removing characters. So if I was to go in here and I was to try to do it with another file, I can say cat, I have a file two dot txt here that ends in commas. If I run that same command on that file, file two dot txt, you can see it still removes that last character. Now you could also come in here and give it multiple dots. So I can say two and that'll remove the last two characters of line. If I was to give it three dots, it would remove the last three characters of line and so forth and so on. Now as of right now, we're just displaying it to the screen. We have not actually modified that file at all. So to modify the file with said, you always just use the dash I, which means modify it in place. Don't just display it to the screen, modify it now. If I cut out that file, you can see that it actually removed those last four characters and that is removing the last few characters from each line of a file in bash, our Linux shell using said. So I thank you for watching. Please visit filmsbychrist.com. That's Chris the K. There's a link in the description. There's a support section there. You can support me through Patreon, Paypal, LibrePay. Can't do that. Think about liking, sharing, subscribing and commenting. I thank you for watching. And as always, I hope that you have a great day.