I have a text file like this:
a b c d e f g
How can I group those lines to obtain an output like this:
a-b b-c c-d d-e e-f f-g
I have to do this in shell (sh, csh, bash).
I have found this:
cat file | xargs -n2
but the last element of first group does not became the first of the second.