On 2001-07-19, Michael Schwendt wrote:

>#!/bin/sh
>VAR1="A1 A2 A3"
>A1="1 2 3"
>A2="4 5 6"
>A3="10 9 8"
>
>for X in $VAR1; do
>  for Y in $X; do
>    eval Z=\$\{$Y\}
>    for N in $Z; do
>      echo $Y $N
>    done
>  done
>done

Read that /bin/bash mail and had to tried.
D'oh. One redundant loop too much:

#!/bin/sh
VAR1="A1 A2 A3"
A1="1 2 3"
A2="4 5 6"
A3="10 9 8"

for X in $VAR1; do
  eval Y=\$\{$X\}
  for N in $Y; do
    echo $X $N
  done
done




_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list

Reply via email to