Ok I have a file with hundreds of lines, four columns, space delimited, TESTB.TXT for example
TESTB.TXT
---
AA ZZ 12 34
BB YY 56 78
CC XX 91 23
DD VV 45 67
---
I want a new file that has 7 columns, the first four are identical, and the next 3 are the last three of the next line...so for example
TESTB2.TXT
---
AA ZZ 12 34 YY 56 78
BB YY 56 78 XX 91 23
CC XX 91 23 VV 45 67
DD VV 45 67
---
I hope I typed that right and I hope the pattern is obvious. Obviously the last line of the file wont have a next line, so its last3 columns are blank. no problem there. or if you know of a similar script just point me to it and I'll hack out the details.