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 Message-ID: <3FA54090.8000801@easyconnect.fr> Date: Sun, 02 Nov 2003 18:36:16 +0100 From: Pierre-Philippe Coupard User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030930 Debian/1.4-5 X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: bash script does't work. References: <20031103014206 DOT 4964 DOT S-YONEDA AT spn1 DOT speednet DOT ne DOT jp> In-Reply-To: <20031103014206.4964.S-YONEDA@spn1.speednet.ne.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Seiji Yoneda wrote: > $ ora8i.sh <---------------- Execute this script --8<--8<-- > $ printenv ORA_HOME <---------------- After execution of script > <----------- After execution, ORA_HOME has nothing !! > $ printenv PATH <---------------- After execution, PATH does't change!! This isn't a cygwin issue. Because the PATH you change in your script is a variable that's local to the shell running it. Because you call your script as a binary, another shell is spawned (the #!/bin/sh basically tells the kernel to use /bin/sh as the interpreter). Try running you script as ". ora8i.sh" and it'll work : the "." is a shell command that means "execute this shell script" (in the current shell). -- Pierre-Philippe Coupard Software Engineer -- Does the name Pavlov ring a bell? -- 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/