Имеется файл iplir.conf (конфиг VipNet) например такой :
> #commentary
[id]
id= 0x1a0e000d
name= координатор2
filterdefault= pass
ip= 192.0.2.9
ip= 192.0.2.10
tunnel= 192.0.2.201-192.0.2.202 to 192.0.2.201-192.0.2.202
firewallip= 192.0.2.11
port= 55777
proxyid= 0x00000000
usefirewall= off
fixfirewall= off
virtualip= 203.0.113.1
version= 3.0-670
#commentary
[id]
id= 0xffffffff
name= Encrypted broadcasts
filterdefault= drop
filterudp= 137, 137, pass, any
filterudp= 138, 138, pass, any
filterudp= 68, 67, pass, any
filterudp= 67, 68, pass, any
filterudp= 2046, 0-65535, pass, recv
filterudp= 2046, 2046, pass, send
filterudp= 2048, 0-65535, pass, recv
filterudp= 2050, 0-65535, pass, recv
filterudp= 2050, 2050, pass, send
[id]
id= 0xfffffffe
name= Main Filter
filterdefault= pass
[id]
id= 0x1a0e000b
name= administrator
filterdefault= pass
ip= 192.0.2.55
accessip= 203.0.113.2
firewallip= 192.0.2.6
port= 55777
proxyid= 0xfffffffe
dynamic_timeout= 0
usefirewall= on
virtualip= 203.0.113.2
version= 3.2-672
[id]
id= 0x1a0e000c
name= [comment] client1
filterdefault= pass
ip= 192.0.2.7
accessip= 203.0.113.3
firewallip= 192.0.2.8
port= 55777
proxyid= 0xfffffffe
dynamic_timeout= 0
usefirewall= on
virtualip= 203.0.113.3
version= 0.3-2
[id]
id= 0x1a0e000a
name= coordinator1
filterdefault= pass
ip= 192.0.2.51
ip= 192.0.2.3
accessip= 203.0.113.4
tunnel= 192.0.2.100-192.0.2.200 to 192.0.2.100-192.0.2.200
firewallip= 192.0.2.4
port= 55777
proxyid= 0x00000000
usefirewall= off
virtualip= 198.51.100.4
version= 3.0-670
[adapter]
name= eth1
ip= 192.0.2.9
allowtraffic= on
type= internal
[adapter]
name= eth0
ip= 192.0.2.10
allowtraffic= on
type= external
[dynamic]
dynamic_proxy= off
firewallip= 192.0.2.11
port= 55777
forward_id= 0x00000000
always_use_server= off
timeout= 25
[misc]
packettype= 4.1
timediff= 7200
warnoldautosave= on
client_pollinterval= 300
server_pollinterval= 900
iparponly= off
ifcheck_timeout= 30
ipforwarding= on
iscaggregate= on
msg_compress_level= 9
mssdecrease= 0
ciphertype= gost
[debug]
debuglevel= 3
debuglogfile= syslog:daemon.debug
[servers]
server= 0x1a0e000a, coordinator1
[virtualip]
startvirtualip= 203.0.113.1
endvirtualip= 203.0.113.4
maxvirtualip= 203.0.113.254
; Do not delete or change the following line!!!
startvirtualiphash= 0xABCDEF01
[visibility]
default= auto
секций [id] может достигать тысячи, запись параметров вертикальная, читать и анализировать не удобно,
подскажите как преобразовать к удобному табличному виду т.е. одна строка одна [id] и параметры пошли по столбикам