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: <055201c55dec$4d34ad10$0400a8c0@AMDLAPTOP1> From: "Aaron Gray" To: References: <052d01c55de0$2382f690$0400a8c0 AT AMDLAPTOP1> <428EF711 DOT 46C085B2 AT dessent DOT net> Subject: Re: setting environment variables from a bash script Date: Sat, 21 May 2005 11:03:08 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit 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. > > It's impossible for a child process to modify the environment of its > parent. By executing the file as a script you spawn a shell subprocess, > meaning the changes to the environment are for that process only. Okay thought so :( > You can get around that by sourcing the script instead of executing it, > because in that case you tell the current shell to read and execute the > commands in the file rather than spawning a subprocess to do it. How do I do that ? "source the script" ? 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/