Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <002901c32427$2e1553e0$78d96f83@pomello>
From: "Max Bowsher" <maxb@ukf.net>
To: "Peter Oosterlynck" <peter.oosterlynck@oracle.com>, <cygwin@cygwin.com>
References: <PHENJGDFMJPEBOBLGEMOCENMCBAA.peter.oosterlynck@oracle.com>
Subject: Re: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; done"
Date: Tue, 27 May 2003 09:08:38 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Cam-ScannerAdmin: mail-scanner-support@ucs.cam.ac.uk
X-Cam-AntiVirus: Not scanned
X-Cam-SpamDetails: 

Peter Oosterlynck wrote:
> When using a line like "for (( i=1 ; i<=5 ; i+=1 )); do echo $i; done" in
a
> bash script one expects to get a list of figures ranging from 1 to 5
right?
> I've never had problems with such constructs on my Linux machine but when
> doing this in a cygwin bash shell, then it works fine when typed in at the
> command line but fails with a syntax error "Bad for loop variable" when
> executed in a script.
>
> Where did I go wrong? Ideas anybody?


/bin/sh != bash


Max.


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

