How to Convert rows in to columns?

view story

http://www.unix.com – Hi Gurus, How to convert rows in to columns using linux shell scripting Input is like (sample.txt) ABC DEF GHI JKL MNO PQR STU VWX YZA BCD output should be (sampleoutput.csv) ABC,DEF,GHI,JKL,MNO PQR,STU,VWX,YZA,BCD After a specified row (for example after 5 rows) out put should be redirected to new line. Thanks in advance... (HowTos)