 So as always, this is part of a series short check out the link in the description of this video to the full playlist as always I recommend you watch the previous videos new ones going up every week we've been working mainly with grep this week searching through files for matching strings and Also in the previous video, I showed you how to use WC to count lines words and And characters that's what I was thinking of a file But let's say you want to get the number of times a particular word appears now We can always use grep and pipe the output into WC We have actually gotten into piping in this series yet But grep actually has if we go into the grep manual by typing man grep You can see there is a built-in functionality right here dash c or dash dash count to count the number of matches So here we go. We can say grep and we can say line and we can say their file name again, that displays how many times a word line appears in a file and Or how many? Yeah displays like matches always good to put quotations You don't have to in all cases, but it's good happy to get into and I can do dash c and it returns But here it's returning the number of lines Just want to be clear on that the number of lines that the word line appears on I can also do dash I which would make a case insensitive which adds an extra line there So if not actually counting the number of matches, it's catching the number of lines It's returning that have matches on it just as if you were to pipe it into WC With a dash L argument But so I just want to show you that I have a bad habit of piping into WC one using grep And really I don't have to because grep has that built-in functionality So I hope you enjoyed this video as always Be great if you became a supporter over at patreon.com forward slash metal x1000 If you can't support me financially you can support me by liking sharing commenting and subscribing to my channel If you have any questions be sure to comment below if you have any comments Maybe a different way of doing the things I'm doing be sure to comment below I thank you for watching as always, please visit my will website films by chris comm that's chris the K There should be a link in the description, and I hope that you have a great day