[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to read fields into an array?

From: Linda Walsh
Subject: How to read fields into an array?
Date: Fri, 01 Aug 2014 17:05:51 -0700
User-agent: Thunderbird

I tried setting a var as an array:

  declare -a var

and then doing a read

   read var

Is there a way to get arrays to work with read directly and
not doing something like a split on space into multiple lines and
use readarray w/that?
It seems like it would make sense if the "declare -a var"
actually had some effect on the subsequent read as
it does in subsequent assignments, for example.

Is there some syntax in the read to do it?  (address@hidden ?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]