One liner to get all the domain names linked from a particular page

for domain in $(lynx --source www.stallman.org |  perl -ne 'if (/href="([^"]*)"/) { print "$1\n"; }' | grep http | grep "://" ); do echo $domain | sed -e "s/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/";  done | sort -u

Also, wow… Stallman links to a ton of stuff.

Posted by Matt Lee

Artist, writer, director and recovering free software user.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.