Module Name: src
Committed By: snj
Date: Fri Jul 17 03:37:40 UTC 2015
Modified Files:
src/usr.bin/gzip [netbsd-7]: zgrep
Log Message:
Pull up following revision(s) (requested by nakayama in ticket #870):
usr.bin/gzip/zgrep: revision 1.9
zgrep(1): suppress the prefixing of filename on output when only
one file is specified to match the grep(1)'s output.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.4.1 src/usr.bin/gzip/zgrep
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/gzip/zgrep
diff -u src/usr.bin/gzip/zgrep:1.8 src/usr.bin/gzip/zgrep:1.8.4.1
--- src/usr.bin/gzip/zgrep:1.8 Thu Jul 25 12:25:23 2013
+++ src/usr.bin/gzip/zgrep Fri Jul 17 03:37:40 2015
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: zgrep,v 1.8 2013/07/25 12:25:23 pgoyette Exp $
+# $NetBSD: zgrep,v 1.8.4.1 2015/07/17 03:37:40 snj Exp $
#
# Copyright (c) 2003 Thomas Klausner.
#
@@ -113,7 +113,7 @@ then
${zcat} -fq - | ${grep} ${grep_args} -- "${pattern}" -
else
# ... on all files given on the command line
- if [ ${silent} -lt 1 ]; then
+ if [ ${silent} -lt 1 -a $# -gt 1 ]; then
grep_args="-H ${grep_args}"
fi
while [ $# -gt 0 ]