Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 X-X-Sender: wirawan AT wirawan0 DOT lan To: cygwin AT cygwin DOT com Subject: Re: Problem with noninteractive bash initialization In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/