delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/20/11:15: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
Date: Thu, 20 Nov 2003 11:14:53 -0500 (EST)
From: Wirawan Purwanto <wirawan AT camelot DOT physics DOT wm DOT edu>
X-X-Sender: wirawan AT wirawan0 DOT lan
To: cygwin AT cygwin DOT com
Subject: Re: Problem with noninteractive bash initialization
In-Reply-To: <Pine.GSO.4.56.0311191610560.12731@slinky.cs.nyu.edu>
Message-ID: <Pine.LNX.4.50.0311201101580.9948-100000@wirawan0.lan>
References: <Pine DOT LNX DOT 4 DOT 50 DOT 0311191531400 DOT 3163-100000 AT wirawan0 DOT lan>
<Pine DOT GSO DOT 4 DOT 56 DOT 0311191610560 DOT 12731 AT slinky DOT cs DOT nyu DOT edu>
MIME-Version: 1.0

On Wed, 19 Nov 2003, Igor Pechtchanski wrote:

> Don't know, WFM:
> 
> $ echo '#!/bin/bash
> echo "Hellow"' > xyz
> $ bash -x xyz
> + echo Hellow
> Hellow
> $ bash --version
> GNU bash, version 2.05b.0(1)-release (i686-pc-cygwin)
> Copyright (C) 2002 Free Software Foundation, Inc.
> $
> 
> BTW, the #! line is redundant if you invoke the script this way -- bash
> (the one you invoked on the command line) simply interprets the commands
> in it, and #! is ignored.
> 	Igor
> 

Do you have a ~/.bashrc file? Or is it empty?

BTW I also noticed the same strange behavior on several other versions of 
cygwin. Notably,

On Linux Mandrake release 7.2 (Odyssey) for i586:
	GNU bash, version 2.04.12(1)-release (i586-mandrake-linux-gnu)
	Copyright 1999 Free Software Foundation, Inc.

On Red Hat Linux release 7.1 (Seawolf) for alpha:
	GNU bash, version 2.04.21(1)-release (alpha-redhat-linux-gnu)
	Copyright 1999 Free Software Foundation, Inc.

<... wandering some more ...>

....WHOOPS. Okay! I found the culprit. That's the BASH_ENV environment
variable! If it is set, the file whose name given by that variable will be
READ and executed BEFORE the actual script is invoked.

Thanks guys for the help!

Wirawan


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

- Raw text -


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