delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/21/04:38:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: <052d01c55de0$2382f690$0400a8c0@AMDLAPTOP1>
From: "Aaron Gray" <angray AT beeb DOT net>
To: <cygwin AT cygwin DOT com>
Subject: setting environment variables from a bash script
Date: Sat, 21 May 2005 09:36:04 +0100
MIME-Version: 1.0
X-IsSubscribed: yes

Is it possible to set an environment variable using a bash script and for 
that variable to be able to be seen within bash once the script is 
finnished.

I want to be able to set the path using a script so I can say :-

        ./gcc-3.4.3

calling a script simular to this :-

        ~~~~ gcc-3.4.3 ~~~~
        #! /bin/sh
        set PATH=/usr/gcc-3.4.3/bin:${PATH}
        ~~~~~~~~~~~~~~~~

which will then set the path from then on.

Hope you can help,

Aaron



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