Simple things which we can do with grep command.
Some questions helpful in understand the command have been discussed here:
- Find pattern red in file colors.txt try both match case and without match case.
- Match files where exact word red appears.
- Match only those lines where red does not appear.
- Count the lines which have a word red.
- Count the lines which have no word red.
- Find the pattern straw in all files.
- Find the exact word straw in all files.
- Find the line and line number at which the word five appears in a file.
- Find the lines in which the word Mango appears.
- Find the lines in which the word mango appears, without matching the case.
- Let’s count the lines in which the word yellow appears in all files.
- Find the files in which word red appears.
- Find the files in which word red does not apear.
- Print only the matching word from all the files.
- Get next three lines after the word triangle in shapes.
- Get two lines before the word blueberry in fruits.
Above tutorial is coming soon in Hindi too.
For more useful video tutorials please visit my Youtube channel at: https://www.youtube.com/channel/UCqQFJUtuySFQz2d8sLIkSDQ