You're replying to a comment by Christopher Suter.

March 18, 2010, 15:19

cartesian product:

$ cat A
a
b
c

$ cat B
1
2

$ join -j2 A B
a 1
a 2
b 1
b 2
c 1
c 2

or, if you like

$ join -j2 A B | awk '{print "("$1", "$2")"}'
(a, 1)
(a, 2)
(b, 1)
(b, 2)
(c, 1)
(c, 2)

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "server": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.