How do I grep recursively?

The first parameter represents the regular expression to search for, while the second one represents the directory that should be searched. In this case, . means the current directory. Note: This works for GNU grep, and on some platforms like Solaris you must specifically use GNU grep as opposed to legacy implementation. For Solaris this … Read more

How do I grep recursively?

The first parameter represents the regular expression to search for, while the second one represents the directory that should be searched. In this case, . means the current directory. Note: This works for GNU grep, and on some platforms like Solaris you must specifically use GNU grep as opposed to legacy implementation. For Solaris this … Read more

What are good grep tools for Windows? [closed]

Based on recommendations in the comments, I’ve started using grepWin and it’s fantastic and free. (I’m still a fan of PowerGREP, but I don’t use it anymore.) I know you already mentioned it, but PowerGREP is awesome. Some of my favorite features are: Right-click on a folder to run PowerGREP on it Use regular expressions … Read more

How can I exclude one word with grep?

You can do it using -v (for –invert-match) option of grep as: grep -v “unwanted_word” file will filter the lines that have the unwanted_word and grep XXXXXXXX will list only lines with pattern XXXXXXXX. EDIT: From your comment it looks like you want to list all lines without the unwanted_word. In that case all you need is: