This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: perl exec question



This is off-topic. You probably want a shell scripting/bash group. But,
since you have my attention.

The env. vars. should be inherited automatically but the function
definitions won't be. This is very easy to get around though. 

1) At the end of your first bash script, add:
	env >/tmp/env.tmp
This will save your env. vars. and function defs. into 'env.tmp'.

2) If you add any env. vars. from perl, append those to env.tmp (in the same
format that env wrote).

3) At the beginning of your second bash script source env.tmp, by adding: 
	. /tmp/env.tmp
	
________________________________
Glen Coakley, Sr. Software Engineer
MQSoftware Inc., (763) 543-4845
"Tinkero ergo sum." -- Chuck Murcko


> -----Original Message-----
> From: Noel L Yap [mailto:yap_noel@jpmorgan.com]
> Sent: Sunday, July 08, 2001 7:42 AM
> To: cygwin@sourceware.cygnus.com
> Subject: perl exec question
> 
> 
> My apology:  Sorry for the errant "Send" before.
> 
> My question:  I would like to exec a perl script that will 
> eventually exec bash
> (or whataver shell the user uses) without losing any settings 
> yrom the original
> shell (eg env var and function defs).  How can I do this?
> 
> If this is too off-topic, can someone point me to the 
> appropriate mailing list,
> please (I've found many perl lists, but not the right one)?
> 
> Thanks,
> Noel
> 
> 
> 
> This communication is for informational purposes only.  It is 
> not intended as
> an offer or solicitation for the purchase or sale of any 
> financial instrument
> or as an official confirmation of any transaction. All market 
> prices, data
> and other information are not warranted as to completeness or 
> accuracy and
> are subject to change without notice. Any comments or 
> statements made herein
> do not necessarily reflect those of J.P. Morgan Chase & Co., its
> subsidiaries and affiliates.
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]