![]() |
![]() |
![]() |
assemble inputfile1 inputfile2 [inputfile3 ...] [ > outputfile]
The
assemble
command is similar to the UNIX
paste
command.
If file `A' contains:
and file `B' contains:
1 2 3
then the UNIX command:
A B C
paste A B
will produce the following output:
The assemble command is a more sophisticated version of
1 A 2 B 3 C
paste
-- suitable for assembling several concurrent spines stored in
different Humdrum files.
The
assemble
command coordinates and synchronizes comments, interpretations,
and data records from the input files.
Duplicate global comments are avoided.
Corresponding local comments are output where appropriate.
Where one file contains local comments and a second file contains none,
null local comments are inserted as appropriate.
Similarly, null interpretations may also be added as necessary.
The assemble command expects that the input files will normally have the same number of data records. These data records are aligned side-by-side. If the input files do not contain the same number of data records, then the spines in the shorter file will be terminated with appropriate spine-path terminators.
Options are specified in the command line.
-h displays a help screen summarizing the command syntax
file1:
!! A sample file.
**foo **foo **foo !1 !2 !3 X . X X . . * *v *v X X . X *- *-
file2:
If the assemble command is invoked as:
!! A sample file. !! An additional global comment.
**bar **bar !4 !5 . . X X *v *v ! joined X . *-
assemble file1 file2
then the corresponding output is:
Notice that both input files begin with the identical global comment;
only one copy of this comment appears in the output.
The second file contains an additional global comment that is also output.
The subsequent local comments have been amalgamated on a single output line.
The spine-path changes in both input files have been properly rendered
by padding null interpretations in the appropriate spines.
The last local comment in
!! A sample file. !! An additional global comment.
**foo **foo **foo **bar **bar !1 !2 !3 !4 !5 X . X . . X . . X X * *v *v * * * * *v *v ! ! ! joined X X X . X . *- *- *-
file2
has also been correctly re-positioned.
Finally, each of the four data records have been aligned.
census (4),
extract (4),
humdrum (4),
paste (UNIX),
timebase (4)