delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
X-envelope-info: | <rschulz AT sonic DOT net> |
Message-Id: | <5.2.1.1.2.20030527093425.02befc88@pop.sonic.net> |
X-Sender: | rschulz AT pop DOT sonic DOT net |
Date: | Tue, 27 May 2003 09:35:56 -0700 |
To: | cygwin AT cygwin DOT com |
From: | Randall R Schulz <rschulz AT sonic DOT net> |
Subject: | Re: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; |
done" | |
In-Reply-To: | <PHENJGDFMJPEBOBLGEMOCENMCBAA.peter.oosterlynck@oracle.com> |
Mime-Version: | 1.0 |
Peter, Make sure your scripts explicitly state /bin/bash as their shell. The default shell (i.e. /bin/sh) under Cygwin is ash, not BASH. It produces the diagnostic you mention when given that command. Randall Schulz At 00:56 2003-05-27, 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? > >Thanks in advance, > >Peter. -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |