Not for awk:
BEGIN {
RS=""
FS="\n"
}
{
for( i=1; i<=NF; i++ ) {
nfields = split($i, afields, ": ")
if( nfields != 2 ) {printf( "Bad fields count: %s %s %s\n", NR, i, $i) | "/dev/stderr"; exit 1 )}
field(afield[1]) = afield[2]
}
}
(Untested, but should be generally accurate.)That parses records based on blank lines, into fields based on lines, splitting the fields into individual data recoreds based on ": " as a regex.
For more, see the GNU Awk User's Guide:
https://www.gnu.org/software/gawk/manual/html_node/Multiple-...