0
We have a script that downloads a list of domains for our squid box to block, but we keep getting warnings like the following:
2015/03/02 17:08:47| WARNING: You should probably remove '.artnau.com' from the ACL named 'chat_domains'
2015/03/02 17:08:47| WARNING: '.artnau.com' is a subdomain of '.css.artnau.com'
2015/03/02 17:08:47| WARNING: because of this '.css.artnau.com' is ignored to keep splay tree searching predictable
2015/03/02 17:08:47| WARNING: You should probably remove '.artnau.com' from the ACL named 'chat_domains'
2015/03/02 17:08:47| WARNING: '.chatserve.com' is a subdomain of '.eagles.chatserve.com'
2015/03/02 17:08:47| WARNING: because of this '.eagles.chatserve.com' is ignored to keep splay tree searching predictable
Is there any way to go through the file, and remove the subdomains from existing domains in the list?
So grab the first line and check to see if there are any other lines in the text that end with that text and remove it?
Can you post part of the file, including the lines which are conflicting? – Tim – 2015-03-03T02:49:56.477
It's a 15k line text document that just lists domain names to be blocked by squid. Here's a link to the file: http://pastebin.com/6mLB2KfZ
– Andrew – 2015-03-03T03:03:43.640Basically it would have a list like: .artnau.com .css.artnau.com .chatserve.com .eagles.chatserve.com
It would be great to (for example) to get .chatserve.com from the list and remove any other lines in the text that end with .chatserve.com (but keep the original line) – Andrew – 2015-03-03T03:04:06.110