About 492,000 results
Open links in new tab
  1. What is the difference between grep -e and grep -E option?

    grep understands three different versions of regular expression syntax: “basic,” “extended” and “perl.” In GNU grep, there is no difference in available functionality between basic and …

  2. Grep: how to add an "OR" condition? - Unix & Linux Stack Exchange

    Dec 1, 2011 · How can I introduce a conditional OR into grep? Something like, grepping a file's type for (JPEG OR JPG), and then sending only those files into the photos folder. For …

  3. How to run grep with multiple AND patterns? - Unix & Linux Stack …

    Mar 25, 2016 · I would like to get the multi pattern match with implicit AND between patterns, i.e. equivalent to running several greps in a sequence: grep pattern1 | grep pattern2 | ... So how to …

  4. grep - How to search text throughout entire file system? - Unix

    69 Assuming that the grep tool should be used, I'd like to search for the text string "800x600" throughout the entire file system. I tried: grep -r 800x600 / but it doesn't work. What I believe …

  5. How to use grep on column? - Unix & Linux Stack Exchange

    Without doing some fancy RegEx where you count commas, you're better off using awk for this problem. awk -F, '$2=="ST"' The -F, parameter specifies the delimiter, which is set to a comma …

  6. grep - Use negate ^ to get results which not contain specified ...

    Nov 2, 2018 · The problem with using grep on filenames is that grep is a line-oriented tool, and filenames may contain newlines. Assuming that all filenames in your file are without newlines, …

  7. Pass the output of previous command to next as an argument

    So grep will just output some value but the question is how to use that value as a parameter of another command. Unfortunately, that important part is missing in your answer.

  8. How can I grep the results of FIND using -EXEC and still output to …

    Dec 17, 2014 · To expand on @gilles answer to make it a little more informative, especially if the list of files you're dealing with is large, you can report the file name (relative path) of each file …

  9. Use "grep" to match text in multiple files - Unix & Linux Stack …

    Aug 29, 2011 · I have data in multiple files. I want to find some text that matches in all files. Can I use the grep command for that? If yes then how?

  10. Can grep return true/false or are there alternative methods

    Another simple way is to use grep -c. That outputs (not return as exit code), the number of lines that match the pattern, so 0 if there's no match or 1 or more if there's a match.