|Keep It Simple, Stupid|
Re: printing contents of small files into one larger oneby mlh2003 (Scribe)
|on Nov 09, 2005 at 11:50 UTC||Need Help??|
Depending on the actual size of your files, you could (this is pseudocode, sorry):
1. loop through each file (open file, slurp into an array, close file).
2. Add the array data to a 2-D array (each 'row' of the array would contain the data from each file).
3. Do a transpose on the 2-D array to get the data in the format you want.
This method would require 2 loops: The first to read the data from the files and add to the array. The second to transpose (which would be a simple 2-D nested loop).
Code is untested unless explicitly stated