shell cartesian product of lines between 2 files code example
Example: shell cartesian product of lines between 2 files
$ cat file1
a
b
$ cat file2
c
d
e
$ join -j 2 file1 file2
a c
a d
a e
b c
b d
b e
$ cat file1
a
b
$ cat file2
c
d
e
$ join -j 2 file1 file2
a c
a d
a e
b c
b d
b e