X-Spam-Check-By: sourceware.org Subject: Re: CASE error in script file To: cygwin AT cygwin DOT com Date: Wed, 8 Nov 2006 19:47:29 -0700 (MST) CC: Jim Easton X-Mailer: ELM [version 2.4ME+ PL66 (25)] Message-Id: <20061109024730.7076B56511@erskine.cs.ualberta.ca> From: jim AT cs DOT ualberta DOT ca (Jim Easton) X-IsSubscribed: yes 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 Hi, 8 Nov 2006 21:57:40 Doug wrote: > I am using Cygwin 1.5.21(0.156/4/2) > case $1 in > 1) > echo '1' > ;; > 2) > echo '2' > ;; > *) > echo 'Dunno' > exit 1 > esac > ... > '/test.sh: line 1: syntax error near unexpected token `in > '/test.sh: line 1: `case $1 in > ... 8 Nov 2006 22:17:08 Jason DePriest wrote: > I am using Cygwin 1.5.21(0.156/4/2), too! > ... > It worked fine. > > If I convert the file to have DOS line endings instead of UNIX line > endings, I recreate your problem exactly! Interesting: When I do that it works fine in both cases, even when I force a at the end of the line. It appears as though when bash sees the at the end of line it automatically deletes it. Mind you I am using an earlier version of cygwin; CYGWIN_NT-5.1 1.5.19(0.150/4/2) 2006-01-20 13:28 and so presumably an earlier version of bash GNU bash, version 3.00.16(14)-release (i686-pc-cygwin) Is there a bash variable that controls such behaviour (I can't find one) or was there an upgrade in the interim? If so I can't honestly say that it's an improvement. Jim Easton -- 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/