ファイル内の1行を除いた1つのパターンを置き換えるソリューションを探しています。例えばファイル内の1行以外のパターンを置き換えます。
: ゾーンファイル:
私は "SPF" レコード行を除いて 192.168.1.101でそれにすべての現在のIPアドレス に192.168.1.100を交換したい> cat /var/named/test.com.db
; cPanel first:11.11.0-BETA_16994 (update_time):1468656855 Cpanel::ZoneFile::VERSION:1.3 hostname:server.test.com latest:11.56.0.13
; Zone file for test.com
$TTL 14400
test.com. 86400 IN SOA ns1.test.com. cpanel.test.com. (
2016071602 ;Serial Number
14400 ;refresh
7200 ;retry
2419200 ;expire
43200 )
test.com. 14400 IN A 192.168.1.100
localhost 14400 IN A 127.0.0.1
test.com. 14400 IN MX 0 test.com.
mail 14400 IN CNAME test.com.
www 14400 IN CNAME test.com.
ftp 14400 IN CNAME test.com.
webdisk 14400 IN A 192.168.1.100
cpcalendars 14400 IN A 192.168.1.100
test.com. IN TXT "v=spf1 +a +mx +ip4:192.168.1.100 ~all"
。
これはどのように行うことができますか。
恐ろしい。テスト済みで完璧に動作します:) ありがとうございます。 – Jondi