Created
November 29, 2022 09:01
-
-
Save andcam/c6462b0afe5e047b831d08abb306fc7b to your computer and use it in GitHub Desktop.
extract, sort and count IP4 address from any text file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '/^[0-9.]+[.][0-9]+[.][0-9]+[.][0-9]+$/{if(!a[$0]++)print $0}' RS="[ :/\n]" file.txt | sort | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment