LINUX SED 小技巧一个实例
时间:2010-12-03 来源:ehlopxp
cat named.conf20101203.bak |sed 's#\.db\"\;#\.db\"\;\n allow-transfer { 84.22.112.34;};#g'
被改后的文件是: zone "lie-to-me.us" { type master; file "/var/named/lie-to-me.us.db"; allow-transfer { 84.22.112.34;}; };
zone "kinos-journey.com" { type master; file "/var/named/kinos-journey.com.db"; allow-transfer { 84.22.112.34;}; };
原文件是:
被改后的文件是: zone "lie-to-me.us" { type master; file "/var/named/lie-to-me.us.db"; allow-transfer { 84.22.112.34;}; };
zone "kinos-journey.com" { type master; file "/var/named/kinos-journey.com.db"; allow-transfer { 84.22.112.34;}; };
原文件是:
zone "lie-to-me.us" {
type master;
file "/var/named/lie-to-me.us.db";
};
zone "kinos-journey.com" {
type master;
file "/var/named/kinos-journey.com.db";
};