[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stupid grep
On Mon, 15 May 2000, Steven Pritchard wrote:
> Cloudmaster said:
> > Nope. Darn it. So, anyone know what's causing that? I know I can do stuff
> > like use '-a' or '--text' - but what in the heck would cause grep to
> > suddenly stop properly identifying text files? Y2K.5? Lunar misalignment?
> > Crazy electroluminescent monkies? Me?
>
> There are probably some non-ASCII (8-bit) characters in the log. From
> what I understand (and I haven't looked at the code, so don't quote
> me), the logic to detect binary files isn't all that smart.
>
> Just for fun, you should see what perl says...
>
> perl -le 'print(-T(shift) ? "text" : "binary");' /var/log/messages
sauer@pyro:~ > perl -le 'print(-T(shift) ? "text" : "binary");' /var/log/messages
text
Huh. Perhaps I'll look into something that will find a non-ascii char when
I'm not so tired...
--Danny, who might just 'alias grep="grep -a"', since he doesn't grep
binaries often :)
--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.