delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/23/12:54:30

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: bob <robert DOT lambert AT ae DOT ge DOT com>
Subject: Re: export arrays in cygwin ksh
Date: Tue, 23 May 2006 16:53:37 +0000 (UTC)
Lines: 50
Message-ID: <loom.20060523T184442-38@post.gmane.org>
References: <loom DOT 20060523T162715-39 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 63 DOT 0605231215051 DOT 8977 AT access1 DOT cims DOT nyu DOT edu>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
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

> 
> Two comments.
> 
> One: the output above didn't come from PDKsh in Cygwin (and, most likely,
> didn't even come from the script you posted, since the export statement is
> on line 9 in your script).  FYI, there is more than one ksh implementation
> in Cygwin, and you'll need to tell us more about your Cygwin installation
> (by following the Cygwin problem reporting guidelines at
> <http://cygwin.com/problems.html>, especially the bit on *attaching* the
> output of "cygcheck -svr").
> 
> Two: PDKsh doesn't understand the "export a[*]" syntax.  It does
> understand the "export a[1]" syntax, and even adds the array elements to
> the export table, but there *is* a bug in it that doesn't actually
> propagate the exported array elements to subshells.  I'll look into it
> once I find the time.
> 
> Igor Peshansky, volunteer PDKsh maintainer for Cygwin


Igor

Thanks much for responding.  My responses to your comments:

Your right on the output... I cut out the stuff I tried but did not work in the 
program for clarity.

And 2 your are also right that it did not come from PDKsh.... I actually tried 
to envoke PDKsh by putting #!/bin/PDKsh on line 1 of test1 and test2 but all I 
got was an error msg (: bad interpreter: No such file or directory).

I have come to realize that there is more than 1 implementation of ksh.  The 
syntax I used in my example is exactly what I use on my hp unix workstation and 
it works fine on the hp.  I did try to export individual elements like you 
suggest with no luck.

I did find in my installation in the cygwin/bin dir a file ksh.exe which is 
what I assume it was running.  Guess that is not pdksh.

My own IT people do not know what version of cygwin I am using (I am not 
laughing!)  I will try to find out more info on this.  I think we are using 
redhat, but will dig deeper.  Thanks

Your last comment - are you saying I may not be able to export my array data to 
later processes or script files ?

Thanks
Bob




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