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:
parent
7b8b4db54b
commit
e88cd0b16a
2
hosts
2
hosts
@ -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" \
|
||||
|
Loading…
Reference in New Issue
Block a user