I have a file that has unique lines that start with 2 stars (**).
However when I run a grep command for
grep \*\* fileName
I get all of the lines in the file. This is very unusual, and what I see as non-matching lines do not contain **.
How would I escape the ** for the correct lines to be found?
Best Answer
So try :
Don't forget to use double quote.
Note: Use
egrep
instead ofgrep
.If you want to use
grep
usegrep -E