Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Peter Oosterlynck" To: Subject: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; done" Date: Tue, 27 May 2003 09:56:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h4R7wCg08260 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/