X-Spam-Check-By: sourceware.org
Message-ID: <453F873E.7080009@cygwin.com>
Date: Wed, 25 Oct 2006 11:48:14 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
Reply-To: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060916 Fedora/1.5.0.7-1.fc4.remi Thunderbird/1.5.0.7 Mnenhy/0.7.4.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cygwin out of sync with version?
References: <453F74AC.4060304@wi.rr.com>
In-Reply-To: <453F74AC.4060304@wi.rr.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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
> 
> Now, this used to work just fine, but now I receive the following error 
> message:
> 
> $ ./findme.bash 10.65.118.
> '/findme.bash: line 2: syntax error near unexpected token `do
> '/findme.bash: line 2: `        for i in $( ls *.gz ); do
> 
> The only thing that I can think of that might have changed was that I 
> recently downloaded and installed the mjpegtools for cygwin, which might 
> have been compiled under a different version of cygwin, earlier/devel? 
> ... at anyrate, I've run this same script on another linux box for 
> testing, and it still works just fine, which is why I'm back to thinking 
> that this is a problem with my install of cygwin.
> 
> Is there a way to repair the existing installation, or a way to confirm 
> that all of the installed software is the correct version?  I've already 
> run the setup, and had it perform the updates that were available, but 
> it still is erroring out.

Read the announcement for the recent release of bash and run your script
through 'd2u'.  The former should familiarize you with the basis for this
issue and possible solutions in general and the latter will fix your
current problem. ;-)

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

--
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/

