Matches patterns in input text. Supports simple patterns and regular expressions.
grep {{search_string}} {{file_path}}
grep -i {{search_string}} {{path/to/file}}
grep -rI {{search_string}} .
-E
for extended regex, supporting ?
, +
, {}
, ()
and |
):grep -e {{^regex$}} {{path/to/file}}
grep -C 3 {{search_string}} {{path/to/file}}
grep -c {{search_string}} {{path/to/file}}
grep -n {{search_string}} {{path/to/file}}
grep -l {{search_string}} {{path/to/file}}
cat {{path/to/file}} | grep {{search_string}}
grep -v {{search_string}}