Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

array as loopvariable - howto



Hi

I would like to write a loop over a list of arrays,

e.g. I would like to iterate over pairs of (username,UID)

A naiv try like

for User in (User1,100) (User2,120); do  echo "$U[1] has UID $U[2]";
done

failed.
Is this possible in ZSH?

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



Messages sorted by: Reverse Date, Date, Thread, Author