delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/10/29/18:26:27

X-Spam-Check-By: sourceware.org
Message-ID: <45453898.3040300@tlinx.org>
Date: Sun, 29 Oct 2006 15:26:16 -0800
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin out of sync with version?
References: <453F74AC DOT 4060304 AT wi DOT rr DOT com>
In-Reply-To: <453F74AC.4060304@wi.rr.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Joey Officer wrote:
> I have a script that I run, the script is:
>
> findme.bash:
> #!/bin/bash
>        for i in $( ls *.gz ); do
>                echo Searching $i
>                zcat -c $i | grep $1 >> searchresults.txt
>                echo Finsihed searching $i , moving on to the next file...
>        done
Hey, Joey, I'm curious,

Would
    zgrep "$1" *.gz

Work for your findme program?, or if you need the filename, maybe...
    zgrep -H "$1" *.gz

Won't give exact same output, but if you don't need the exact
"start/stop" of searching with each file...




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019