Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

843.Count and statistics -- How to count the number of ip addresses from each country?

User: editor -- 2011-08-27          << 842  844 >>
Hits: 3217
Type: Count and statistics   
Search all Count and statistics examples
Description:
How to make statistics on a list of ip addresses, find out the number of ip addresses from each country?
Input Sample:
123.22.44.50 
37.28.42.105 
... 
156.222.38.42
Output Sample:
United Stats: 25 
Poland: 8 
Japan: 3 
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open the ip addresses list text file 
2. ctrl-h open 'replace' dialog 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
3. click 'replace' button, all ip address will be convert to country name. 
4. open "Tools->Pattern Counter" menu 
5. click "Clear" button to clear current pattern 
6. click "Add" button to add a new rule 
* set 'Name' to:  
* set 'Pattern' to:  
* click 'ok' 
7. select the newly added rule, and click 'Detail' button, all country and number will be listed in detail. 

Screenshot 1:  Replace_Window


Screenshot 2:  Pattern_Counter_Window


Similar Examples:
How to count the number of specified part in each line? (69%)
How to count the number of Unique IP address from a web log file? (68%)
How to count the number of records for each month in a web log file? (65%)
How to count the number of lines under each specified pattern? (63%)
How to count the number of occurrence of every double letters? (62%)
How to sort all lines of ip addresses in a text file? (62%)
How to count the number of non-empty columns? (61%)
How to count the number of words for many files and append result to each file? (61%)

Check Demo of Count and statistics
Keywords:
ddd  odd  current  pattern counter  counter  addresses  ip address  statistics  statist  count and statistics  find and replace ip to country  find ip address  convert ip address  find and replace list  convert number  convert text to number  convert to number  count statistics in list