The odtcat utility reads an ODT file on stdin that contains one or more tables, and concatenates them together into a single table, creating a new ODT file consisting of a single table. When successive tables are joined, the tail of the first is truncated as necessary so that the specified control column is monotonic across the seam.
This tool is useful for fixing up ODT output from a simulation that was interrupted and restarted from checkpoint data one or more times.
The odtcat launch command is:
tclsh oommf.tcl odtcat [standard options] [-b overlap_lines] \ [-c control_column] [-o order] [-q] <infile >outfilewhere
Each table in the input stream is assumed to have the same layout as the first; header information between tables is summarily eliminated. As each table is encountered, a check is made that the new table has the same number of columns as the first. If not, an error is reported and processing is halted.
When subsequent table headers are encountered, the values in the control column in the tail of the preceding table and the head of the succeeding table are compared. The order selection is used to determine the position of the start of the latter table inside the tail of the former. If the data are not compatible with the specified ordering, then an error is reported an the program aborts. If identical values are discovered, then the matching lines in the earlier table are excluded from the output stream.
If the -q flag is not specified, then after processing is complete a report is written to stderr detailing the number of tables merged and the number of data lines eliminated.