I have multiple files, let's say file1, file2 etc. Each file has one word in each line, like:
file1 file2 file3
one four six
two five
three
What I want is to combine them in a new file4 in every possible permutation (without repetition) in pairs. Like
onetwo
onethree
onefour
onefive
...
twothree
...
onefour
...
fourone
...
How is this possible using Linux commands?
Best Answer
Use this:
Output: