David Powell wrote: > Roland Mainz wrote: > > Erm... without testing I guess you hit filename globbing in this case. > > You create a file "list0" which matches the shell pattern "list[0]" and > > therefore the 2nd read will hit a different name as array name. > > There are two fixes: > > a) Use $ set -o noglob # to disable filename globbing > > b) Use quotes around variable names which access array elements, e.g. $ > > echo foo | read 'list[0]' # in the example above. > > Excellent, that did it. Seems like noglob is a requirement for any > heavy array consumer (I couldn't imagine escaping all mine).
Well, it isn't a requirement but "noglob" helps with both performance and cases like this. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)