cc: [email protected] Subject: Re: [ast-users] A few read issues -------- > Hi. While we're on the subject of read, I've been sitting on these for a > while. > > The first possible issue involves $'\n' as a field separator. This works in > Bash/zsh/mksh for mapping lines to separate members of an array, just not > ksh93: > > $ ( printf %s\\n {a..f} | IFS=$'\n' read -rd '' -A a; typeset -p a ) > typeset -a a=($'a\nb\nc\nd\ne\nf\n') > > The second issue occurs when combining read -N with an assignment directly to > an array. Seems easy to reproduce: > > $ ksh -c 'integer n=0; printf xxx | while read -rN1 "a[n++]"; do :; done' > Memory fault > > Lastly, a tangentially related question about the FILESCAN feature. Is it > intentional for "$@" to expand to a single word in this context? > > $ ( while <<<$'a b c\nd e f\ng h i'; do printf '<%s> ' "$@"; echo; done ) > <a b c> > <d e f> > <g h i> > > Thanks! > -- > Dan Douglas > _______________________________________________
These should be fixed in the next alpha. David Korn [email protected] _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
