Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godaddy Correction Perl Script Issue #49

Closed
jerryji opened this issue Dec 2, 2012 · 0 comments
Closed

Godaddy Correction Perl Script Issue #49

jerryji opened this issue Dec 2, 2012 · 0 comments

Comments

@jerryji
Copy link

jerryji commented Dec 2, 2012

Hi, your one-line Perl script for correcting Godaddy export does not work for me --

(2012/12/02 12:28:14)[0]$ perl -pe 's/(CNAME .+)(?!.)$/$1./i' bizspeaking.com.zone > bizspeaking.com.zone.fixed

(2012/12/02 13:22:42)[0]$ diff -wc bizspeaking.com.zone bizspeaking.com.zone.fixed
*** bizspeaking.com.zone 2012-12-02 12:25:57.298353143 +0800
--- bizspeaking.com.zone.fixed 2012-12-02 13:22:42.314278717 +0800


*** 37,43 ****
; A Records
@ 1800 IN A 173.230.149.183

! ; CNAME Records
blog 3600 IN CNAME bizspeaking.wordpress.com
cf 3600 IN CNAME d1hvliv42vq06p.cloudfront.net
cfa 3600 IN CNAME d1hvliv42vq06p.cloudfront.net
--- 37,43 ----
; A Records
@ 1800 IN A 173.230.149.183

! ; CNAME Records.
blog 3600 IN CNAME bizspeaking.wordpress.com
cf 3600 IN CNAME d1hvliv42vq06p.cloudfront.net
cfa 3600 IN CNAME d1hvliv42vq06p.cloudfront.net

For one, tabs are used in Godaddy export. I also had to include explicit character set, otherwise the match behaves so weird as to be beyond my understanding... --

(2012/12/02 13:22:43)[0]$ perl -pe 's/(\s+CNAME\s+[a-zA-Z0-9.-_]+)(?!.)$/$1./i' bizspeaking.com.zone > bizspeaking.com.zone.fixed

(2012/12/02 13:25:06)[0]$ diff -wc bizspeaking.com.zone bizspeaking.com.zone.fixed
*** bizspeaking.com.zone 2012-12-02 12:25:57.298353143 +0800
--- bizspeaking.com.zone.fixed 2012-12-02 13:25:06.962275555 +0800


*** 37,50 ****
; A Records
@ 1800 IN A 173.230.149.183

! ; CNAME Records
! blog 3600 IN CNAME bizspeaking.wordpress.com
! cf 3600 IN CNAME d1hvliv42vq06p.cloudfront.net
! cfa 3600 IN CNAME d1hvliv42vq06p.cloudfront.net
! mail 3600 IN CNAME ghs.google.com
www 3600 IN CNAME @

; MX Records
--- 37,50 ----
; A Records
@ 1800 IN A 173.230.149.183

! ; CNAME Records.
! blog 3600 IN CNAME bizspeaking.wordpress.com.
! cf 3600 IN CNAME d1hvliv42vq06p.cloudfront.net.
! cfa 3600 IN CNAME d1hvliv42vq06p.cloudfront.net.
! mail 3600 IN CNAME ghs.google.com.
www 3600 IN CNAME @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants