[Top][All Lists]

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

Re: problem with grep

From: Julian Foad
Subject: Re: problem with grep
Date: Tue, 07 Jun 2005 22:01:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217

Damotharan, Suresh (GE Trans, Non-US, Non-GE) wrote:
   Can you please specify the usage for grep
I went thru the manpage for grep

This is not a bug.

The bit of the man page that you need is:

              If  the  first few bytes of a file indicate that the file con-­
              tains binary data, assume that the file is of type  TYPE.   By
              default,  TYPE  is  binary, and grep normally outputs either a
              one-line message saying that a binary file matches, or no mes-­
              sage  if  there  is  no match.  If TYPE is without-match, grep
              assumes that a binary file does not match; this is  equivalent
              to  the  -I  option.  If TYPE is text, grep processes a binary
              file as if it were text; this is equivalent to the -a  option.
              Warning: grep --binary-files=text might output binary garbage,
              which can have nasty side effects if the output is a  terminal
              and  if the terminal driver interprets some of it as commands.

- Julian

I am using the following command

grep -A 10 "PROBLEM SUMMARY - by type" icdsb.rpt

I am getting the output as Binary file icdsb.rpt matches not the next 10
lines after the line "PROBLEM SUMMARY -by type"

Please note that my input file has two lines matching for the after
Can you please comment on this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]