1

concat file content horizontally in vi/vim

view story
linux-howto

http://unix.stackexchange.com – I have a text file that contains a big matrix, that columns are split like the following example: col1 col2 col3 row1 .. .. .. row2 .. .. .. row3 .. .. .. row4 .. .. .. row5 .. .. .. row6 .. .. .. col4 col5 col6 row1 .. .. .. row2 .. .. .. row3 .. .. .. row4 .. .. .. row5 .. .. .. row6 .. .. .. How can I concatenate the splitted columns horizontally so that the file can be something like this: col1 col2 col3 col4 col5 col6 row1 .. .. .. .. .. .. row2 .. .. .. .. .. .. row3 .. .. .. (HowTos)