On Mon, Aug 13, 2012 at 11:07 PM, Roland Mainz <roland.ma...@nrubsig.org> wrote:
> Hi!
>
> ----
>
> Does anyone know where the spaces between the numbers in the output
> below come from (I'm using ast-ksh.2012-08-13 (ksh93v- alpha)) ? This
> doesn't seem to come from IFS or any other known source...
> -- snip --
> $ ksh -c 'set -o nounset ; x="1234" ; true "${x//~(X)([012])|([345])/
> }" ; compound co ; typeset -m co.array=.sh.match ; IFS='' ; print
> "|${co.array[1][0..1]}${co.array[2][2..3]}|"'
> |1 23 4|
> -- snip --
>
> Somehow I would've expected "|1234|" (e.g. no spaces) as output...

2nd (related ?) issue:
-- snip --
$ ksh -c 'set -o nounset ; x="1234" ; true
"${x//~(X)([012])|([345])/X}" ; IFS='' ; print
"|${.sh.match[1][0..1]}x${.sh.match[1][666..669]}|"'
-- snip --
... prints "|1 2x1|" while I would expect "|1 2x|" ...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to