[BACK]Return to zgrep CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / gzip

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/gzip/zgrep between version 1.5 and 1.5.20.1

version 1.5, 2006/05/03 16:48:29 version 1.5.20.1, 2008/05/18 12:36:06
Line 12 
Line 12 
 # 2. Redistributions in binary form must reproduce the above copyright  # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the  #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.  #    documentation and/or other materials provided with the distribution.
 # 3. The name of the author may not be used to endorse or promote products  
 #    derived from this software without specific prior written permission.  
 #  #
 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES  # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 33  endofopts=0
Line 31  endofopts=0
 pattern_found=0  pattern_found=0
 grep_args=""  grep_args=""
 hyphen=0  hyphen=0
   silent=0
   
 prg=$0  prg=$0
   
Line 78  do
Line 77  do
             hyphen=1              hyphen=1
             shift              shift
             ;;              ;;
           -h)
               silent=1
               shift
               ;;
         -*)          -*)
             grep_args="${grep_args} $1"              grep_args="${grep_args} $1"
             shift              shift
Line 110  then
Line 113  then
     ${zcat} -fq - | ${grep} ${grep_args} -- "${pattern}" -      ${zcat} -fq - | ${grep} ${grep_args} -- "${pattern}" -
 else  else
     # ... on all files given on the command line      # ... on all files given on the command line
       if [ ${silent} -lt 1 ]; then
           grep_args="-H ${grep_args}"
       fi
     while [ $# -gt 0 ]      while [ $# -gt 0 ]
     do      do
         ${zcat} -fq -- "$1" | ${grep} -H --label="${1}" ${grep_args} -- "${pattern}" -          ${zcat} -fq -- "$1" | ${grep} --label="${1}" ${grep_args} -- "${pattern}" -
         shift          shift
     done      done
 fi  fi

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.20.1

CVSweb <webmaster@jp.NetBSD.org>