It is currently Mon, 25 Sep 2023 11:47:31 GMT

Author Message
 grep problem.
Dear All,

Can't grep the system log, please help me.

The error messages.
grep: Maximum line length of 2048 exceeded.


 Sun, 20 Aug 2006 04:55:51 GMT   
 grep problem.
In article <c22s28$>,

Are you sure you're grepping the log file, and not a binary file?  I've
never seen log messages that long before (in fact, I think syslog() or
syslogd automatically splits long messages into multiple lines).

If you really do need to grep a file with ultra-long lines, try using
GNU grep.  I doubt it has any limit on the line length.

Barry Margolin,
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

 Sun, 20 Aug 2006 05:05:19 GMT   
 grep problem.

And as a quick and dirty thing, if you don't have GNU grep installed
and still want to grep something with long lines, you can always
use Perl.

"grep pattern filename" becomes "perl -ne 'print if /pattern/' filename".

   - Logan

 Sun, 20 Aug 2006 06:44:59 GMT   
 grep problem.
Thank you all. : )

"Smart" <> |b?l news:c22s28$

 Tue, 22 Aug 2006 01:34:48 GMT   
   [ 4 post ] 

Similar Threads

1. grep problems - strange

2. csh/grep problem (on Linux)

3. grep problem in ps aux

4. grep problem

5. Q: Bizarre grep problem

6. sed/grep problems

7. 2K grep problem

8. grep problem

9. grep problem - need to extract a substring

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software