Skip to content

Instantly share code, notes, and snippets.

@border
Last active December 28, 2015 10:08
Show Gist options
  • Save border/7483796 to your computer and use it in GitHub Desktop.
Save border/7483796 to your computer and use it in GitHub Desktop.
通过grep获取网页的URL信息
cat citylist.txt| grep -o -E 'href="([^"#]+)"' | cut -d '"' -f2 | sort | uniq
cat citylist.txt| grep -o -E 'http://([a-z]+).XXX.com' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment