To modify a host's resolved address we can change /etc/hosts
I want to have that functionality when running a single script without actually modifying /etc/hosts
Something
$HOST=foo.bar:10.0.1.256 ping foo.bar
would be the same as having an entry in /etc/hosts
10.0.1.256 foo.bar
and $ ping foo.bar
Is this doable? Thanks in advance.