[Top][All Lists]

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

Re: grep -h option does not work correctly

From: Benno Schulenberg
Subject: Re: grep -h option does not work correctly
Date: Thu, 01 Nov 2007 22:06:54 +0100
User-agent: KMail/1.9.7

Kinshuk Srivastava wrote:
> Benno Schulenberg schrieb:
> > You probably have 'grep' aliased to 'grep -H'.  Check the
> > output of 'type -a grep'.
> Somehow "type" is not a shell command in my shell...
> although there seems to be no alias set for grep...

Maybe also check the contents: echo $GREP_OPTIONS

> The  command I used is simply...
> grep  -r -h  "Searchstring"  *
> Result: finds Searchstring in 101 files...
> Doesnt print file names of 100 files but
> along with the expected standard output prints
> also the name of the 101th file only...

So it prints the filename for just a very few files?  Are it maybe 
those files themselves that contain their own filename at the start 
of some lines?

If that is not the case, then make a new directory, copy some of the 
offending files into it, and run the grep command on that dir, and 
show the full output.


PS: Please keep your answers on-list.

reply via email to

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