Linux Replace ip in resolv.conf with domain name lookup

#!/bin/bash host_name=my-proxy-domain.com ip_addr=$(getent hosts $host_name | cut -f1 -d’ ‘) echo “Proxy: $ip_addr” replace_cmd=’/proxy\.lan/c\'”$ip_addr\t proxy.lan #replaced” echo “Cmd: $replace_cmd” sed -i “$replace_cmd” /etc/hosts   Like224 Dislike28 107100cookie-checkLinux Replace ip in resolv.conf with domain name lookupno