Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

574.Count and statistics -- How to count how many IP addresses with different classes from web logs?

User: editor -- 2010-07-27          << 573  575 >>
Hits: 2394
Type: Count and statistics   
Search all Count and statistics examples
How to count how many IP addresses with different classes from web logs? 
How to make statistics of weblogs, find out how many class A IP addresses, as well as class B,C,D,E 
Input Sample:
web log files: .... ... 
Output Sample:
A 81378 
B 5181 
C 23929
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
There are following classes of IP addresses:  
Class A to  
Class B to  
Class C to 
Class D to 
Class E to    
1. ctrl-o open source log file 
2. ctrl-h open replace window 
* in search for pattern, enter: 
* uncheck option of "Print Unmatched Unit" 
# click "Advanced" page, 
* in "run following at the beginning of replace", enter: 
in "run following for each matched unit", enter: 
* in "insert end text", enter: 
3. click "Replace", done!
Download Script:  scripts/

Screenshot 1:  Replace_Window

Screenshot 2:  Replace_Advanced_Window

Similar Examples:
How to count how many IP addresses are appearing in  a text file? (64%)
How to count the number of Unique IP address from a web log file? (62%)
How to count and sort the occurrence of different numbers in a text file? (60%)
How to count the frequency of different words in website like (60%)
How to count how many characters in a web page? (59%)
How to count and sort the occurrance of different lines? (57%)
How to count the number of records for each month in a web log file? (57%)
How to extract email addresses from multiple webpages? (55%)

Check Demo of Count and statistics
ddd  blog  count how many ip addresses  101  logs  class  123  count how many  var  insert end text  find replace web page  insert beginning  insert text at beginning  beginning end  web page search replace  insert text end text  insert text end  replace text in web page