Monday, December 7, 2015

URL Scraping/Extraction w/Sed

alias lsurls='_(){ sed "s/http/\nhttp/g" "${1}" | sed -n "s/\(^http[s]*:[a-Z0-9/.?=_-]*\)\(.*\)/\1/p"; }; _' 
E.g. lsurls <(curl http://www.cnn.com)

No comments:

Post a Comment