delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/08/10:29:49

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
Message-ID: <00a501c1df09$fec72bd0$cd8a9dc0@uk.aonix.com>
From: "Cliff Hones" <cliff AT aonix DOT co DOT uk>
To: <cygwin AT cygwin DOT com>
References: <000601c1df07$aa056550$3f891581 AT 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
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

Evan Teran <emt3734 AT ritvax DOT isc DOT rit DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019