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: <00a501c1df09$fec72bd0$cd8a9dc0@uk.aonix.com>
From: "Cliff Hones" <cliff@aonix.co.uk>
To: <cygwin@cygwin.com>
References: <000601c1df07$aa056550$3f891581@proxy>
Subject: Re: question about local variables in bash for cygwin
Date: Mon, 8 Apr 2002 15:29:55 +0100
Organization: Aonix Europe Ltd.
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

Evan Teran <emt3734@ritvax.isc.rit.edu> writes:
> Hello I have cygwin installed on my WinXP box and am loving it.  However
> I just noticed today that when I tried to use the local keyword in my
> bash script it gives me the error "local: not found".  The script works
> on a RedHat box as expected so I would think that this is a cygwin/bash
> problem.

On Linux /bin/sh is normally bash, but on Cygwin it is ash,
and ash does not support 'local'.  Change the first line
to #!/bin/bash and it should work.

Cliff



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

