Dunpack [ -t default-delimiter ] [ -z default-options ] field-format-list [ input-file.. ]
Dunpack decomposes a field into repeating fields, using an input format given by the field-format-list. A field listed in the field-format-list is decomposed. The value part is scanned with the input format (or default format given by -t and -z) repeatedly, and each part becomes a new field with the same field name. The original field is substituted by these new fields.
Decomposition is made to all the fields listed in the field-format-list independently. If the field-format-list is "a" and the input record has two fields "a", both the first and the second "a" fields are decomposed. There is no general way to revert it to original fields (if you Dpack it, the result has just one field "a").
In the input formats for Dunpack, absolute positioning (DIGITS, -DIGITS or (DIGITS)) and f (with field name) are not allowed. Repeat (*) may be used, but is unnecessary, because it is applied implicitly for all fields.
Command:
Dunpack -t "/" "y,t:,a:/\,/"
Input:
a:1,2,3
a:4
y:1996/1997
t:packed
Result:
a:1
a:2
a:3
a:4
y:1996
y:1997
t:p
t:a
t:c
t:k
t:e
t:d
See the manual of D_msg.
MIYAZAWA Akira