Guide to Madagascar programs |
The first input file is either in the list or in the standard input.
Everything on the command line that does not contain a ``='' sign is treated as a file name, and the corresponding file object is added to the list.
As explained above, if the space= parameter is not set, it is inferred from the program name: sfmerge corresponds to space=y and sfcat corresponds to space=n.
Find the axis for the merging (from the command line axis= argument) and figure out two sizes: n1 for everything after the axis and n2 for everything before the axis.
In the output, the selected axis will get extended.
The rest is simple: loop through the datasets reading and writing the data in buffer-size chunks and adding extra empty chunks if space=y.
Guide to Madagascar programs |