可以一次显示出ini的一个段吗

可以一次显示出ini的一个段吗

比如
引用:
[Fonts] <-从这里判断
....
...
<-空行,显示到这里
[Other]
命令行的方法,一次可以显示出第一段。

awk -F[ '/Fonts/' opera6.ini
跳不过新行。不知道写。[/quote]
匹配行开始 和 行 结束 不就可以了
^[ 和 $[ ?
'/^\[Fonts.*$\[/' ?
不行啊。跳不过中间的那些\n的。
记得有个取多行的参数。原来是RS。岂不是方便得很。   

$ awk -F[ 'BEGIN{RS = ""} /Fonts]/' ~/.opera/opera6.ini
[Fonts]
H1=32,7,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
H2=24,7,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
H3=19,7,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
H4=16,7,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
H5=13,7,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
H6=11,7,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Form.Button=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Form.Input=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Form.Text=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Normal=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
PRE=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Toolbar=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Dialog=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Panel=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Email=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
EmailCompose=10,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]
Menu=12,4,0,0,0,0,WenQuanYi Bitmap Song [WenQuanYi]