I don't know if there's an easy way, but if not would you consider an RFE --
Is there a syntax for a mult-var assignment, ala:
(a b c d)=(1 2 3 4)
results would be: a=1, b=2, c=3, d=4
I know I can get the rval into an array, but can't figure out how to move
the array vals to discrete variables.
In *this* particular situation, I'm trying to something like
for (p v1 v2) in "(a 1 2)" "(b 2.0 2.1)" "(c 0.2.2 0.2.2-1)"; do
...
If it's not there, I wonder if it would be a syntactic advantage to use
a lead-in char, like "@" to indicate that a parenthesized list following
it would be a list of vars ?
I'm constantly running into little scriptlets that need multiple vals
assigned/interation,
and it would be so handy to have a simple syntax, than to do the more perverse
thing:
U="$(uname -sno)"
PUB_CONST SYSTEM_KERNEL="${U%% *}"
U="${U##$SYSTEM_KERNEL }"
PUBLIC HOSTNAME="${U%% *}"
U="${U##$HOSTNAME }"
PUB_CONST OSTYPE="${U//\//-}"
unset U