About 840,000 results
Open links in new tab
  1. bash - What does grep -v "grep" mean and do? - Ask Ubuntu

    Jun 24, 2019 · See man grep for details. As far as the grep utility is itself concerned, it's unimportant that the pattern grep passed to it as an argument is the same as its name.

  2. How to use "grep" command to find text including subdirectories

    Aug 1, 2011 · I want to find all files which contain a specific string of text. The grep command works, but I don't know how to use it for every directory (I can only do it for my current …

  3. grep the man page of a command for hyphenated options

    May 11, 2014 · My favorite approach to find a given option in a man page is to use a regex like \s{2,}-option. For the question in hand, you can do man grep and then type the regex:

  4. command line - How do I view the man pages? - Ask Ubuntu

    The convention (followed by most, but not all packages) is to add a manpage per command, which is why man grep works, but there are manpages that don't describe commands. man …

  5. How to use grep to search for options in a man page? [duplicate]

    Oct 9, 2020 · I want to search for specific options like -s, -f, -l in a manpage and display only the results that contain info on what those options do. I tried this command hoping that the single …

  6. command line - How would you count every occurrence of a term …

    Nov 6, 2015 · grep -Rc [term] * will do that. The -R flag means you want to recursively search the current directory and all of its subdirectories. The * is a file selector meaning: all files. The -c …

  7. How can I search a file to see if it contains multiple patterns ...

    Jan 29, 2024 · 1 It can be done using multiple grep commands. Read man grep xargs, and do something like grep -l 'pattern1' -f filelist | \ xargs grep -l 'pattern2` | \ xargs grep -l 'pattern3' …

  8. How to command grep not to display the searched string?

    Explanation: From man grep: -o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. -P, --perl-regexp Interpret …

  9. What does the 'grep' command do? - Ask Ubuntu

    Sep 24, 2013 · grep is used to search for text from a file or another command's output. It can return the lines where it finds a match or the lines where it doesn't.

  10. How can I grep the output of a man page? [duplicate]

    Oct 16, 2017 · I'm seeking the man page info for a switch for a given command. I tried for example man sort | grep -A2 "-n,". I expected something like: -n, --numeric-sort …