请教这个脚本怎么写,谢谢!

请教这个脚本怎么写,谢谢!

我有一个文件/tmp/check.txt内容如下:
.............................
UnattendMode = DefaultHide
OemPnPDriversPath = "\Drivers\NIC;\Drivers\aic79xx"
OemSkipEula = Yes
............................
其中.......内容省略,请问我要写一个脚本,进行修改以OemPnPDriversPath为关键字的那一行
将OemPnPDriversPath = "\Drivers\NIC;\Drivers\aic79xx"这一行改为:
OemPnPDriversPath = "\Drivers\aic79xx;Drivers\PCI"
所得的新文件/tmp/check.txt内容如下:
.............................
UnattendMode = DefaultHide
OemPnPDriversPath = "\Drivers\aic79xx;Drivers\PCI"
OemSkipEula = Yes
...........................
用perl写吧
模式匹配
举个例子:

[code:1]perl -i -pe s%\<table\ cellpadding=\"0\"\ cellspacing=\"0\"\ border=\"0\"\>%\<table\ cellpadding=\"1\"\ cellspacing=\"1\"\ border=\"0\"\>% html/add_user.html[/code:1]
Perl听说太难学了,我还没有开始呢,谢谢大家.
现在问题已经解决了,用shell写的:
cat /tmp/check.txt |sed -e "s/OemPnPDriversPath =.*/OemPnPDriversPath ="\Drivers\NIC/;\Drivers\aic79xx"/OemPnPDriversPath = "\Drivers\aic79xx/;Drivers\PCI"/" >check.txt
[code:1]zhyfly@zhyfly:~/bash$ cat check.txt
.............................
UnattendMode = DefaultHide
OemPnPDriversPath = "\Drivers\NIC;\Drivers\aic79xx"
OemSkipEula = Yes
............................
zhyfly@zhyfly:~/bash$ sed 's/NIC\;\\/aic79xx\;/g;s/aic79xx/PCI/g' check.txt
.............................
UnattendMode = DefaultHide
OemPnPDriversPath = "\Drivers\PCI;Drivers\PCI"
OemSkipEula = Yes
............................
zhyfly@zhyfly:~/bash$

[/code:1]