Tag Archives: extract urls

Get a list of urls/domains from a text file

I was just in need of a little script that extracts all urls from a text file. Here is the result.
sed ’s/http/\^http/g’ FILENAME | tr -s "^" "\n" | grep http| sed ’s/[\ |\\\|\"].*//g’ | sed "s/['].*//g" | sort | uniq
And as my final goal was to extract a list of domain names from the [...]