grep
Zoek patronen in bestanden met behulp van reguliere expressies. Meer informatie: https://www.gnu.org/software/grep/manual/grep.html.
grep "{{zoekpatroon}}" {{pad/naar/bestand}}
grep {{[-F|--fixed-strings]}} "{{exacte_string}}" {{pad/naar/bestand}}
grep {{[-r|--recursive]}} {{[-n|--line-number]}} --binary-files {{without-match}} "{{zoekpatroon}}" {{pad/naar/map}}
?
, +
, {}
, ()
en |
), in hoofdletterongevoelige modus:grep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{zoekpatroon}}" {{pad/naar/bestand}}
grep --{{context|before-context|after-context}} 3 "{{zoekpatroon}}" {{pad/naar/bestand}}
grep {{[-H|--with-filename]}} {{[-n|--line-number]}} --color=always "{{zoekpatroon}}" {{pad/naar/bestand}}
grep {{[-o|--only-matching]}} "{{zoekpatroon}}" {{pad/naar/bestand}}
stdin
naar regels die niet overeenkomen met een patroon:cat {{pad/naar/bestand}} | grep {{[-v|--invert-match]}} "{{zoekpatroon}}"