Parsing /etc/net.cfg?

Not really a QNX 6 question, but…

I’m wondering how people parse out files like net.cfg that use the win.ini format with heading lines and configuration lines.

I’d like to write a shell script that can go in and recognize the headings, and then modify the appropriate settings lines in the correct heading section.

I want to keep it relatively simple (for my sake): a shell script using only things like sed and awk.

Suggestions?

tia
kmb