On Tue, May 28, 2013 at 7:24 PM, David Korn <[email protected]> wrote:
> Subject: Re: [ast-developers] Copying or moving .sh.match via typeset -m or  
> typeset -c doesn't work
> --------
>
>> ast-ksh 20130524 prints nothing if we attempt to either move or copy
>> the contents of .sh.match.
>>
>> Examples:
>> ksh -c 'function f2 { nameref mar=$1 ; typeset dummy x="-1a2b3c4d9u" ;
>> dummy="${x//~(E)([[:digit:]])|([[:alpha:]])/D}" ; typeset -m
>> "mar=.sh.match" ; } ; function f1 { typeset -a matchar ; f2 matchar ;
>> print -v matchxar ; } ; f1; :
>>
>> ksh -c 'function f2 { nameref mar=$1 ; typeset dummy x="-1a2b3c4d9u" ;
>> dummy="${x//~(E)([[:digit:]])|([[:alpha:]])/D}" ; typeset -c
>> "mar=.sh.match" ; } ; function f1 { typeset -a matchar ; f2 matchar ;
>> print -v matchxar ; } ; f1; :
>>
>> Irek
>>
>
> This is a bug and not an easy one since .sh.match is treated specially
> for performance reasons.

Can you reuse the code used by read -C to print the array as text and
read it back in as array?

Irek
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to