GNU bug report logs -
#30326
grep not searching through a text file (thinking it binary)
Previous Next
Reported by: "L. A. Walsh" <gnu <at> tlinx.org>
Date: Fri, 2 Feb 2018 19:31:02 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I've used grep to search through my mbox-format emails for decades, but
I've run into a case where it seems to be ignore a text mailbox
because, I guess, it thinks it is "binary" (I think ignoring binary
is a default in my aliases file).
I used:
> grep -Pr 'Game:\s+NCSOFT' *
and it ignored a mailbox named 'Domain': that contained the
string:
" =E2=80=A2=09Game: NCSOFT"
> file Domain
Domain: Non-ISO extended-ASCII text, with very long lines
If I used "-Par" it finds it.
It seems that grep believes the file to binary and ignores it, though
"file" calls it "text".
Any ideas?
grep -V
grep (GNU grep) 2.21.31-adf9
Maybe grep is being a bit overzealous in calling files 'binary'?
This bug report was last modified 7 years and 34 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.