I will offer a (very) general approach, or hint rather.
It appears that your data samples, especially sample 2, represents a form of fixed length records that consist of a header record that can be identified by have a non-space character in col 1 (assume 1-based col numbering) and continuation records identified by space characters in cols 1 and 2.
Given that you can easily find the start of a master record, and that there appears to be a standard structure to the continuation records, then unpack becomes your best friend and makes the actual extraction trivial.
The presence of the header title records is what reduces this to a simple problem that unpack is uniquely intended to handle. All that you really need to do is keep track of what record/sub-record row number you are on so you apply the correct unpack pattern to it and extract the data to normal variables.
In reply to Re: Bug in script when users use long names
by boftx
in thread Bug in script when users use long names
by Sparky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |