Dtie [ options ] [ -t default-delimiter ] [ -N|L|S ] leaf-field-list new-field-name [ input-file.. ]
Dtie ties a group of fields listed in the leaf-field-list to create a new field with the new-field-name. The listed fields are removed and replaced by the new field.
When the listed fields are repeating, they are separated to leaves with the leaf separation algorithm given by -NLS options, and each leaf is tied individually. It is a process to reduce a repeating group to a repeating field. For the leaf separation algorithm, see the manual of D_lsa.
By default, fields are tied with TAB control character. But, the leaf-field-list may have formats in it, and in this case, fields are tied following these formats. When no format is given in the leaf-field-list, -t and -z options are used. Note that fields are tied in the order which appears in the record, and not in the order listed in the leaf-field-list.
Command:
Dtie -t / "y,m,d" date input-file
Input-file:
y:1998
m:08
d:13
Result:
date:1998/08/13
Command
Dtie -t " " a,b,c leaf input-file
Input-file:
stem:1
a:A1
b:B1
c:C1
c:C2
b:B2
a:A2
Result:
stem:1
leaf:A1 B1 C1
leaf:C2 B2 A2
(The leaf field order may not follow the leaf-field-list.)
Command:
Dtie -t " / " -S "v:/\ :\ /,t,r:/\ ;\ /*" vols
Input-file:
tr:Great Computer Books
v:1
t:The C language
r:B W. Kernighan
r:D M. Ritchie
v:2
t:My Battle
r:Bill Gates
Result:
tr:Great Computer Books
vols:1 : The C language / B W. Kernighan ; D M. Ritchie
vols:2 : My Battle / Bill Gates
See the manual of D_msg.
MIYAZAWA Akira