Cute rewrites, but I think you could do better a lot of the time.
For example rather than using `cat`, `grep`, and `cut`, just use awk:
function dns_nameserver() {
awk '/nameserver/ {print $2}' /etc/resolv.conf
}