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

for domain in $(lynx --source http://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.

Advertisements