Dpack [ -t default-delimiter ] [ -z default-options ] field-format-list [ input-file.. ]
Dpack packs a repeating fields into a single field. Fields to be packed are listed in the field-format-list. A new field is created, which has the field name same as the original fields have, and has a value composed of the original field values, applying the output format in the field-format-list. (If there is no format in the list, -t and -z options are applied). The original fields are deleted, and, instead, this new field is placed at the position of the first occurrence of the original fields.
Each entry of the field-format-list is packed independently; i.e., when the field-format-list is "a,b", field "a" is packed, and then field "b" is packed.
In the input formats for Dunpack, absolute positioning (DIGITS, -DIGITS or (DIGITS)) and f (with field name) are not allowed.
Command:
Dpack -t "/" "y,v:r:%8.6e,t://"
Input:
a:1
t:p
y:1996
v:0.58
y:1997
v:-.756
t:a
t:c
t:k
t:e
t:d
Result:
a:1
t:packed
y:1996/1997
v:5.800000e-01/-7.560000e-01
See the manual of D_msg.
MIYAZAWA Akira