 As I mentioned in the first video in this series, and this is a series, so be sure to check out the annotation on the screen or the description of this video for the full playlist. I mentioned in the first video that there are some internal commands when you're working with a shell and there are some external programs that you would use. And some of the external programs, I mean they can be pretty much anything, but there are some that are very common on most systems. One of which is grep. Grep is a very useful tool. We can bring up the manual for it by typing man grep. And basically it's used to search for patterns in a file. So if you need to find words or phrases or special characters and return portions of a file or the output of another program based on those strings, you can do so. There's lots of options. We're going to look at the very bare minimum of using it today. So let's go ahead and I'm going to hit Q to get out of that. And I have created a file. I can use cat if I haven't mentioned in a previous view. Just displays out a file or a group of files. So I have a file called file dot text. I can cut that out. And you can see it has, you know, six lines or so five lines. And we can use grep to look for certain words and phrases. So let's say we want to only display the words that have the word line in them. Now we have two options. Now you see that we have line three times in this file. If I say grep, I can say grep line and the name of the file, file dot text or txt. We'll hit enter and you see it only displays two lines. And the reason for that once again, everything is case sensitive. So line two here has line with a capital L. So if I was to do the same command by hitting up arrow to go back to last command and changing that line to line. And it's not a bad habit to get into putting this in quotation marks. You can see now it returns only the line that has the word line with the capital L. Now, let's say we want to return all lines that have the word line, regardless of case. Well, we can do dash I dash I will make it case insensitive. And now we get all three lines that have the word line on them. I can do the same for the word this it because I have the dash I making case insensitive. It doesn't matter how I capitalize this is going to return every line that has the word this in it. Of course, you can do more than one word I can do. This is so it's only going to return those first two lines. I could also do type space line, which will return this one line. Another thing you can do is get the reverse of what you're looking for. So let's say I want to display every line that doesn't have the word this in it. So you can see that four out of the five lines have the word this. What I could do is I can say this if I just did this with a dash V that means invert the search. So now it's going to return only lines that don't have that value in it. So I can hit enter and it's going to return three lines because again, we don't have that dash I. So now it's case sensitive. If I want to, I can just do dash VI should work. You can also write it out like this with a dash for both this first options a little bit shorter. So those are just some very basic grep commands. So you give grep string you're looking for and the file you want to search through and it will output it. And my system set up to highlight the word with a different color. Your system may or may not be set up to do that. So yeah, find the word you're looking for make a case in sensitive with dash I invert the search with dash V. And then you can make it invert and case insensitive with case insensitive with VI. So thank you for watching. I hope you enjoyed this tutorial. We're going to do more on grep in the coming videos. It's a very useful tool. And as always, I hope that you have a great day.