Re: "read" array variables via pipe vs. redirection
On Tue, 18 Mar 2008 05:00:17 -0700, mop2 wrote:
> You can try:
> "${function}" | { read -a var; echo ${#var[@]} ${var[*]};} or:
> read -a var < <("${function}"); echo ${#var[@]} ${var[*]}
Thank you. The first suggestion has problems, but the second will be
useful for my needs; I hadn't seen that redirection technique before.
|