I have a file with (with only one line) with multiple columns say 4 (in this case) :
A B C D
And I want the output as every possible combination of column values taking 2 at a time like:
AB AC AD BC BD CD
BA are equivalent. I have tried the code:
sed 's! \([^ ]\+\)\( \|$\)!\1 !g' <file_name> but it gives the output as
Please suggest how to do this using
awk or any shell command.