1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-12-29 12:32:44 +00:00

Match variable space in duplicate detection.

This commit is contained in:
William Melody 2020-04-12 16:52:47 -07:00
parent 7b8b4db54b
commit e88cd0b16a

2
hosts
View File

@ -695,7 +695,7 @@ add() {
exit 1
elif grep \
-e "^${_ip}[[:space:]]\+${_hostname}$" \
-e "^${_ip}[[:space:]]\+${_hostname}\\t.*$" "${HOSTS_PATH}"
-e "^${_ip}[[:space:]]\+${_hostname}[[:space:]]\+.*$" "${HOSTS_PATH}"
then
_die printf \
"Duplicate address/host combination, %s unchanged.\\n" \