Extract record from file based on section.

input file
output file

Please provide sample input and expected output.