From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9535 invoked from network); 30 Oct 1997 01:32:42 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 30 Oct 1997 01:32:42 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id UAA14554; Wed, 29 Oct 1997 20:19:27 -0500 (EST) Resent-Date: Wed, 29 Oct 1997 20:18:57 -0500 (EST) From: TGAPE! Message-Id: <199710292020.UAA01581@dal-tsa14-13.cyberramp.net> Subject: Re: Perl replacement challenge To: ramos@ih4ess.ih.lucent.com Date: Wed, 29 Oct 1997 20:20:44 +0000 (GMT) Cc: zsh-users@math.gatech.edu In-Reply-To: <199710291709.LAA11607@ihnns581.ih.lucent.com> from "ramos@ih4ess.ih.lucent.com" at Oct 29, 97 11:09:44 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"otXqD3.0.BY3.02-Lq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1120 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu ramos@ih4ess.ih.lucent.com wrote: >> ramos@ih4ess.ih.lucent.com wrote: >>> I have a very simple and effective solution: >>> >>> # Use "kshdot some_ksh_script" instead of ". some_ksh_script" >>> >>> kshdot() { source =(ksh -c ". $* 1>&2; senv") } >>> >>> Where 'senv' is the following Perl script: 8><= 8><= >> But remember you can make emulate local to a function. You might get >> away with something like >> >> kshdot() { emulate ksh; setopt localoptions; . $*; } >> >> at least for some of the scripts. > > Yup, works for some scripts. But some of them go out of their way to > try to make sure you're really running an honest ksh. 0=-ksh Does this help? (Note: you still need emulate ksh, and you probably will want to change it back, but it works for me in some cases. It doesn't make the emulation better, but it tends to circumnavigate their tests to see if you're running ksh.) Ed