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: Wed, 19 Nov 2003 15:47:17 -0500 (EST) From: Wirawan Purwanto X-X-Sender: wirawan AT wirawan0 DOT lan To: cygwin AT cygwin DOT com Subject: Problem with noninteractive bash initialization Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, How should a noninteractive bash begin (i.e. for executing a script)? Should bash read init files like ~/.bashrc, ~/.bash_profile, or /etc/profile? According to bash documentation on http://www.gnu.org/manual/bash-2.05a/html_mono/bashref.html#SEC62 , NO initialization files would be read. But cygwin's bash (version 2.05b.0(1)-release) DOES reads and executes ~/.bashrc BEFORE executing the actual script itself. Why is this? Is this not a deviation from the prescribed behavior, or what? <---- long explanation To find out whether the .bashrc is executed, simply create a trivial script "xyz". For simplicity let's assume it contains only an echo command: #!/bin/bash echo "Hellow" Then execute: $ bash -x xyz According to BASH standard, it should result in the following printout: + echo 'Hellow' Hellow This is what happens on my linux box (a Mandrake 9.1, with bash version 2.05b.0(1)-release also). But in my cygwin window [under Windows 2000], it spits out lots of initialization commands from ~/.bashrc before finally executing the echo "Hellow" statement. end long explanation ----> Can somebody explain what's wrong with this? 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/