delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/02/12:36:34

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
Message-ID: <3FA54090.8000801@easyconnect.fr>
Date: Sun, 02 Nov 2003 18:36:16 +0100
From: Pierre-Philippe Coupard <pcoupard AT easyconnect DOT fr>
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>

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 <pcoupard AT easyconnect DOT fr>
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/

- Raw text -


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