in reply to Format lines in a File to be outputted in a different sequence

Hello markgoz,

It sounds like you've already got the right approach by reading your input line-by-line with a traditional while loop and doing a split on each line. Then, since you want to collect multiple input lines into one output line, you could collect the input data in a temporary data structure until you have enough to print an output line. Or, if your input and output is always ordered in the way you showed, a simpler (and less flexible) approach would be to only include a \n newline in the output when you want one, instead of for every line of input.

If you need any help with a specific piece of code, feel free to post that.