#!/bin/ash
[ $# -lt 1 ] && echo Usage: ${0##*/} hostname [ip] && exit
sed -i -e "/$1/d" /etc/hosts
[ $2 ] && echo $2 $1 >> /etc/hosts
