function ssh-del-num { local line_no set -u line_no=${1} sed -i.bak "${line_no}d" ~/.ssh/known_hosts set +u } function ssh-del-name { local host_name set -u host_name=${1} sed -n "/${host_name}/p" ~/.ssh/known_hosts printf "Delete the above? (y/n)" read -q resp if [[ "y" == "${resp}" ]]; then sed -i.bak "/${host_name}/d" ~/.ssh/known_hosts fi set +u }