[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
iteration of array cartesian product in awk
From: |
Peng Yu |
Subject: |
iteration of array cartesian product in awk |
Date: |
Thu, 16 Apr 2020 15:34:59 -0500 |
Hi,
In python, it is relatively easy to iterate the cartesian production
of a number of lists.
for x in izip(l1, l2, ...):
print x
https://stackoverflow.com/questions/12237283/how-to-iterate-in-a-cartesian-product-of-lists
Note that, in the above example, the number of lists is known at the
program time. But in my case, it is unknown at program time but only
at runtime.
Is there an easy way to implement the iteration of the cartesian
product of a number of arrays (the number is only known at run time)
in awk?
--
Regards,
Peng
- iteration of array cartesian product in awk,
Peng Yu <=