You are not logged in.

#1 2007-04-25 04:14:57

fivre
Member
Registered: 2007-04-17
Posts: 97

grep returns Binary file (standard input) matches

I'm trying to grep an old irc log by "cat ~/irclogs/old/#ocremix.log | grep '+'" but this returns 'Binary file (standard input) matches' instead of grepping it. I can't think why since the cat output itself is normal. The only thing that sets them apart is that they were created by a Windows application so I assume there's some encoding difference. Is there any way to fix this?

Offline

#2 2007-04-25 04:57:28

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: grep returns Binary file (standard input) matches

The grep -a, --text option may be of use to you. This will force grep to actually print the contents of the file.

If you are looking to fix the actual file, I would say open it up in an editor and resave it and see what that does.

Offline

#3 2007-04-25 10:48:31

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: grep returns Binary file (standard input) matches

On a sidenote: why 'cat file | grep ...'?? Use 'grep .... file'.


1000

Offline

Board footer

Powered by FluxBB