You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May I put this into the Wiki?
This script outputs only the SLD part from a list of domain names.
So if you have subdomain.example.co.uk on your list, the output will be example.co.uk.
# Prepare the list for finding second-level domainsPublicsuffix_regexp() {
local LIST_URL="https://publicsuffix.org/list/public_suffix_list.dat"# Download list,# remove empty lines and comments,# escape dots, asterisks and add SLD regexp
wget -qO- "$LIST_URL" \
| grep -v "^\s*$\|^\s*//" \
| sed -e 's/\./\\./g' -e 's/\*/.*/' -e 's/^\(.*\)$/[^.]\\+\\.\1$/'
}
Publicsuffix_regexp | grep -o -f - "$YOUR_DOMAINS"
I use it for registration expiry purposes.
The text was updated successfully, but these errors were encountered:
May I put this into the Wiki?
This script outputs only the SLD part from a list of domain names.
So if you have
subdomain.example.co.uk
on your list, the output will beexample.co.uk
.I use it for registration expiry purposes.
The text was updated successfully, but these errors were encountered: