Opening page…
Search text with patterns — flags, regex modes, and context lines.
grep pattern fileBasic searchgrep -r pattern dir/Recursive searchgrep pattern *.txtMultiple filescat file | grep patternPipe input-iCase-insensitive-vInvert (non-matching lines)-wWhole word match-xWhole line match-e patternExplicit pattern-f filePatterns from file-EExtended regex (like egrep)-FFixed strings, no regex-PPerl-compatible regex-GBasic regex (default)-cCount matching lines-lFilenames only-nShow line numbers-oPrint only the match-qQuiet (exit code only)-m NUMStop after NUM matches--colorHighlight matches-A NUMNUM lines after match-B NUMNUM lines before match-C NUMNUM lines around match