grep : binary file matches

Bash shell is the common linux command language.
Post Reply
mister_v
Posts: 199
Joined: Thu Mar 04, 2010 9:19 pm

grep : binary file matches

Post by mister_v »

I use grep to find a string in a text file, but got nothing
and the message is binary file matches

And it should show some matches. If i open the txt-file with kate and search, I find it.
chris
Site Admin
Posts: 205
Joined: Mon Jul 21, 2008 9:52 am

Re: grep : binary file matches

Post by chris »

Grep thinks that it is binary file for some reason,
and doesn't process it.
Maybe there are some special characters in the txt file.

You can solve it by forcing:
grep --text
grep -a
or grep --binary-files=text
Post Reply