Lennart Schultz wrote: > In the construct > cat file|while read line > do > done > the content of any arry assignments in the loop dissapears leaving the loop:
This is logic, since every part of the pipe runs in an own subshell (the first one runs in the "current shell"). This behaviour is also *not* limited to arrays. This is not a bug, this is a consequence of Bash's design. You might find hints here: Why? http://bash-hackers.org/wiki/doku.php/scripting/processtree How to do it instead? http://bash-hackers.org/wiki/doku.php/syntax/expansion/proc_subst J.