Skip to content

Instantly share code, notes, and snippets.

@dd404x
Last active April 10, 2019 01:05
Show Gist options
  • Select an option

  • Save dd404x/27c860f52cffd68ca11af40d92383593 to your computer and use it in GitHub Desktop.

Select an option

Save dd404x/27c860f52cffd68ca11af40d92383593 to your computer and use it in GitHub Desktop.
检索文本中IP地址并去重
cat hosts.txt | grep -o '\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}'|sort -d | uniq >> IPFile.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment