Dave's Brain

Browse - Computer Tips - How can I make grep search for a string without interpreting it as a regular expression?

Date: 2017may23
OS: Linux

Q.  How can I make grep search for a string without interpreting it as a regular expression?

A.  Use fgrep, eg:

fgrep '*' *.txt
Not you still have to protect wildcard characters from the shell.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.