I'd like to list all the domains our source code refers to, allowing the limitation of finding only those that are statically referenced and begin with https?://. For example, I've tried the following:
find -s [^.]* -print0 | xargs -0 sed -En 's/.*https?:\/\/([a-z0-9\-\.\_]+).*/\1/p' | sort | uniq
The bug is, when there's more than one domain on a single line, only one will be returned. Can this be remedied with simple shell tools, ie without fully parsing the HTML?