Skip to content

Instantly share code, notes, and snippets.

@remonsec
Last active August 31, 2020 06:24
Show Gist options
  • Save remonsec/d41966bf3314fe35ad7d4465fd29419c to your computer and use it in GitHub Desktop.
Save remonsec/d41966bf3314fe35ad7d4465fd29419c to your computer and use it in GitHub Desktop.
Get root domain from list of URL
cat urls.txt | awk -F[/:] '{print $4}' | sed 's/www.//'
cat urls.txt | cut -d'/' -f3 | sed 's/www.//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment