bug-grep
[Top][All Lists]
Advanced

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

The -h parameter spits out lines with filenames


From: Fred .
Subject: The -h parameter spits out lines with filenames
Date: Fri, 16 May 2008 19:59:18 +0200

# 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.




reply via email to

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