Closed T145 closed 2 months ago
Seems to be the carriage return characters (had to use awk here since I'm testing this on a mobile emulator)
$ awk '$1~/^(0.0.0.0|127.0.0.1|0|::)$/&&$2!~/^(localhost|local|localhost.localdomain)$/{print $2}' a | grep localhost
localhost
localhost.store.pay.florencerepairs.com
nlocalhost.wordtheminer.com
www.localhost.store.pay.florencerepairs.com
$ sed -i 's/\r//g' a
$ awk '$1~/^(0.0.0.0|127.0.0.1|0|::)$/&&$2!~/^(localhost|local|localhost.localdomain)$/{print $2}' a | grep localhost
localhost.store.pay.florencerepairs.com
nlocalhost.wordtheminer.com
www.localhost.store.pay.florencerepairs.com
Thanks for verifying! A quick sub(/\r$/, "")
should fix it then.
Contact Details
No response
What happened?
The following command:
Performed on the
schakal
list prints the given output, when the "localhost" is not expected to be included.What's confusing is the
127.0.0.1 localhost
entry isn't ignored, but in other lists that use that same statement (like KodoPenguin's GameIndustry list) it is.This regex works on all other hosts files, so again this is strange. Maybe an issue with line endings?
Operating System
Debian Bookworm
Relevant log output
Code of Conduct