2 ms·
Alternative for the cartesian product (instead of the nested loops): join <(sed 's/^/1 /' set1) <(sed 's/^/1 /' set2) | cut -d ' ' -f 2- Edit, someone in
by pepve 10y ago
Alternative for the cartesian product (instead of the nested loops):
join <(sed 's/^/1 /' set1) <(sed 's/^/1 /' set2) | cut -d ' ' -f 2-
Edit, someone in the comments there has a far better trick:
join -j 2 set1 set2