#!/bin/bash sed -i '/ns3.hichina.com/d' /etc/hosts sed -i '/alidns.aliyuncs.com/d' /etc/hosts echo `host -t A ns3.hichina.com 114.114.114.114 | grep 'has address' 2>&1 | tail -n1 | awk -F ' ' '{print $4}'` ns3.hichina.com >> /etc/hosts echo `host -t A alidns.aliyuncs.com 114.114.114.114 | grep 'has address' 2>&1 | tail -n1 | awk -F ' ' '{print $4}'` alidns.aliyuncs.com >> /etc/hosts /config/aliddns/aliddns.sh >> /tmp/aliddns.log