-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

grep


> Find patterns in files using regular expressions.

More information.


Search for a pattern within a file:

grep "{search_pattern}" {path/to/file}

Search for an exact string (disables regular expressions):

grep --fixed-strings "{exact_string}" {path/to/file}

Search for a pattern in all files recursively in a directory, showing line numbers of matches, ignoring binary files:

grep --recursive --line-number --binary-files={without-match} "{search_pattern}" {path/to/directory}

Use extended regular expressions (supports `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode:

grep --extended-regexp --ignore-case "{search_pattern}" {path/to/file}

Print 3 lines of context around, before, or after each match:

grep --{context|before-context|after-context}={3} "{search_pattern}" {path/to/file}

Print file name and line number for each match:

grep --with-filename --line-number "{search_pattern}" {path/to/file}

Search for lines matching a pattern, printing only the matched text:

grep --only-matching "{search_pattern}" {path/to/file}

Search stdin for lines that do not match a pattern:

cat {path/to/file} | grep --invert-match "{search_pattern}"


> Copyright © 2014—present the tldr-pages team and contributors.

> This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).

CC-BY



-- Response ended

-- Page fetched on Fri May 17 16:29:22 2024