delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/16/10:31:33

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 16 May 2001 15:30:40 +0100
Message-ID: <9380-Wed16May2001153040+0100-starksb@ebi.ac.uk>
X-Mailer: emacs 20.7.1 (via feedmail 9-beta-7 I);
VM 6.92 under Emacs 20.7.1
From: David Starks-Browning <starksb AT ebi DOT ac DOT uk>
MIME-Version: 1.0
To: ABAK Systemes <info AT abaksystemes DOT fr>
Cc: cygwin AT cygwin DOT com
Subject: source not found in sh
In-Reply-To: <3B02823A.63654981@abaksystemes.fr>
References: <3B02823A DOT 63654981 AT abaksystemes DOT fr>

On Wednesday 16 May 01, ABAK Systemes writes:
> Hello
> 
> 'source file' works fine in bash (cygwin 1.1.8). But in a shell script I
> get the following error:
> 
> source not found
> 
> When I replace source by . everything is OK. 

There is a FAQ entry "Why doesn't my script work" (I'll change it to
"why doesn't my shell script work"), which points out that /bin/sh is
ash, not bash.  Apparently 'source' is a bash-ism, not an ash-ism, and
I'll add this to the list of missing features.  (Unless it someone
corrects me and explains otherwise.)

If you need bash features in your script, use

	#! /bin/bash

rather than

	#! /bin/sh

Hope this helps.

Regards,
David
Cygwin FAQ maintainer

 -------------------------------------------------------------------
  David Starks-Browning                  | starksb AT ebi DOT ac DOT uk
  EMBL Outstation --                     |
  The European Bioinformatics Institute  |
  Wellcome Trust Genome Campus           | tel: +44 (1223) 494 616
  Hinxton, Cambridge, CB10 1SD, UK       | fax: +44 (1223) 494 468
 -------------------------------------------------------------------


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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