We wanted a conversion from a source extract to tabular file. I am trying to explain with a below sample.
We have the source file as below with each highlighted set of rows represent a record. In each row the first value represents a field (“1” always signify the first filed or beginning of a new record) and the second value represents the corresponding value. Only for field 75700 it stores a type for which the corresponding value gets stored in field 75701 (in the next row) . 75700 can have multiple values (7000,45457000 etc) among which 7000 which holds the actual value which we’ll be storing. Corresponding value will be in the column 75701.
Trying to demonstrate with the below sample –
Source file -
Expected tabular formatted file -
850000225| item2| item3|||||||item4 (stored the value for field 75700)
850000225|item5|item6|||||item7|item8| (didn’t store stored the value for field 75700 as ‘Type’ was different)
Can any one of you help me scripting it in UNIX?