delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/21/21:33:50

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: <5.1.0.14.2.20020921183006.020ec008@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Sat, 21 Sep 2002 18:33:59 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: Bash local builtin and redirection problems
In-Reply-To: <5.0.2.1.0.20020922103312.00a6a850@fox.uq.net.au>
Mime-Version: 1.0

Ray,

Were I to guess why "local" and the I/O redirection syntax _appear_ to be 
missing when your script executes, I'd guess that it's because the 
script(s) in question begins with this:

#!/bin/sh

Under Cygwin, /bin/sh is Ash, not BASH.

Randall Schulz
Mountain View, CA USA


At 18:00 2002-09-21, Ray Pimm wrote:
>I have successfully installed Cygwin on Windows 2000 SP3. However, when I 
>attempt to run a bash shell script that works fine under Linux, two 
>problems occur.
>
>1. The bash "local" builtin does not seem to work. Error message is 
>"local: not found".
>
>2. Both shorthand formats "&>file" and ">&file" for redirecting standard 
>output and standard error do not work. However, the longhand equivalent 
>">file 2>&1" does work.
>
>Strangely, both of the above features work from the bash command line (but 
>not from a shell script).
>
>Cygwin version is 1.3.12-4.
>
>Bash version is 2.05b-5. An earlier version 2.05a-3 also fails.
>
>Ray


--
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