bug-grep
[Top][All Lists]
Advanced

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

Re: The -h parameter spits out lines with filenames


From: Tony Abou-Assaleh
Subject: Re: The -h parameter spits out lines with filenames
Date: Fri, 16 May 2008 17:57:14 -0300
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

Fred . wrote:
# 2.3 mb
fgrep --recursive "//" * > comments-1.txt

# 3.8 mb
fgrep -h --recursive "//" * > comments-2.txt

$ wc -l comments-1.txt
30123 comments-1.txt

$ wc -l comments-2.txt
61708 comments-2.txt

I did this on the Linux kernel source.
Why does the -h parameter make it spit out over twice as many lines?

For the first 5845 lines it works correctly. After that it starts
spitting the lines with filenames.
arch/s390/appldata/appldata.h:11://#define APPLDATA_DEBUG                       
/* Debug
messages on/off */
arch/cris/arch-v10/kernel/time.c:200://static unsigned short myjiff;
/* used by our debug routine print_timestamp */
arch/parisc/kernel/real2.S:280: /*
http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html

Then it stops at line 37430 with the filenames and resumes to printing
lines without the filenames until end of file.

Not sure if this is a bug, or me being stupid.

Hi Fred.

Thanks for your report. What version of grep are you using and on which system/distribution?

Can you try it with the latest version from ftp://alpha.gnu.org/gnu/grep and let us know if the problem persists?

Cheers,

TAA

--
Tony Abou-Assaleh
Email:    address@hidden
Web site: http://tony.abou-assaleh.net




reply via email to

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