1

Transpose recursively into delimited file

view story
linux-howto

http://www.unix.com – I would like to write a script that takes something like this: Line 1 Line 2 Line 3 Line 4 [Blank line] Line 6 Line 7 Line 8 Line 9 [Blank line] etc.... And makes it to look like this: Line 1|Line 2|Line 3|Line 4|[Blank line, if it's easier] Line 6|Line 7|Line 8|Line 9|[Blank line, if it's easier] etc. I would think it would be fairly easy to use two loops, one for the the 5-line pattern and one for each set of 5 lines. However, I am having trouble planning out the code because if I create a loop within the loop, I have problems figuring out how to control which line to re (HowTos)