[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stupid grep




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

Steve
-- 
steve@silug.org           | Linux Users of Central Illinois
(618)398-7320             | Meetings the 4th Tuesday of every month
Steven Pritchard          | http://www.luci.org/ for more info

--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.