Afficher un message
Vieux 18/03/2008, 16h46   #9
Greg Russell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.

  Réponse avec citation
 
Page generated in 0,06538 seconds with 9 queries