[BusyBox-cvs] svn commit: trunk/busybox/findutils
vapier at busybox.net
vapier at busybox.net
Sat Apr 16 04:56:11 UTC 2005
Author: vapier
Date: 2005-04-15 22:56:11 -0600 (Fri, 15 Apr 2005)
New Revision: 10115
Log:
In Bug 78, shortkey points out:
If you run `grep -h . file1 file2 file3 ...`, the output is not prefixed
with the filename. If you run `grep -h . file1` however, the filename
will incorrectly prefix the output.
Modified:
trunk/busybox/findutils/grep.c
Changeset:
Modified: trunk/busybox/findutils/grep.c
===================================================================
--- trunk/busybox/findutils/grep.c 2005-04-16 04:48:48 UTC (rev 10114)
+++ trunk/busybox/findutils/grep.c 2005-04-16 04:56:11 UTC (rev 10115)
@@ -98,7 +98,7 @@
}
last_line_printed = linenum;
#endif
- if (print_filename)
+ if (print_filename > 0)
printf("%s%c", cur_file, decoration);
if (print_line_num)
printf("%i%c", linenum, decoration);
@@ -219,7 +219,7 @@
/* grep -c: print [filename:]count, even if count is zero */
if (print_match_counts) {
- if (print_filename)
+ if (print_filename > 0)
printf("%s:", cur_file);
printf("%d\n", nmatches);
}
More information about the busybox-cvs
mailing list