grep
grep
let you search one or more input files for lines containing a match to a specified pattern. By default the outputs the matching lines.
Search in file
We can use grep
to search term in file(s)
- Specify which file you wish to search. Use
grep
followed by thesearch term
and file locetion,then it shoud be
├── Gatsby
│ ├── README.md
│ ├── building-site.md
│ ├── install.md
│ └── publish-netlify-cms.md
├── Hugo
│ └── README.md
├── README.md
└── jekyll
├── building-contents.md
├── configure.md
├── custom-domain.md
├── front-matter.md
├── google-analytics.md
├── install.md
├── publish-to-netlify.md
├── readme.md
└── theme.md
For example searching for term gatsby
in install.md file
$ grep gatsby install.md
If there’s gatsby
words in the file, it will show the sentences with the term in them.