Source-Changes-HG archive

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

[src/netbsd-2-0]: src/usr.bin/gzip Pull up revision 1.3 (requested by mrg in ...



details:   https://anonhg.NetBSD.org/src/rev/9e38b0724197
branches:  netbsd-2-0
changeset: 561235:9e38b0724197
user:      tron <tron%NetBSD.org@localhost>
date:      Sun May 30 14:59:56 2004 +0000

description:
Pull up revision 1.3 (requested by mrg in ticket #421):
quote pattern when passing to grep, so that paterns containing
spaces would be handled properly
fixes PR bin/25345 by Arto Selonen

diffstat:

 usr.bin/gzip/zgrep |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r acfd1630c88c -r 9e38b0724197 usr.bin/gzip/zgrep
--- a/usr.bin/gzip/zgrep        Sun May 30 14:56:40 2004 +0000
+++ b/usr.bin/gzip/zgrep        Sun May 30 14:59:56 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: zgrep,v 1.2 2003/12/28 17:26:48 wiz Exp $
+# $NetBSD: zgrep,v 1.2.2.1 2004/05/30 14:59:56 tron Exp $
 #
 # Copyright (c) 2003 Thomas Klausner.
 #
@@ -101,12 +101,12 @@
 if [ $# -lt 1 ]
 then
     # ... on stdin
-    ${zcat} - | ${grep} ${grep_args} ${pattern} -
+    ${zcat} - | ${grep} ${grep_args} "${pattern}" -
 else
     # ... on all files given on the command line
     while [ $# -gt 0 ]
     do
-       ${zcat} -- "$1" | ${grep} -H --label="${1}" ${pattern} ${grep_args} -
+       ${zcat} -- "$1" | ${grep} -H --label="${1}" "${pattern}" ${grep_args} -
        shift
     done
 fi



Home | Main Index | Thread Index | Old Index