系统相关
首页 > 系统相关> > LINUX_修改_servername

LINUX_修改_servername

作者:互联网

RES_CONF=$IP #SERVER_NAME
#for D_NAME in $(cat ip_list)
do
(sleep 10) | `ssh $D_NAME cat /etc/resolv.conf | grep $IP | awk '{print $2}' > server_name`

DNS=$(cat server_name)

echo $DNS

if [[ $DNS == $RES_CONF ]] ; then
echo $IP >> SERVR_NAME_IP

else
echo $IP >> SERVER_NAME_IPW
fi

done

标签:NAME,IP,servername,echo,修改,CONF,DNS,LINUX,cat
来源: https://www.cnblogs.com/quemengqio/p/11949598.html