Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

471.Count and statistics -- How to count the number of Unique IP address from a web log file?

User: editor -- 2010-04-08          << 470  472 >>
Hits: 2638
Type: Count and statistics   
Search all Count and statistics examples
How to count the number of Unique IP address from a web log file?
Input Sample: - - [31/Mar/2010:05:21:55 -0700] "GET ... - - [31/Mar/2010:05:22:35 -0700] "GET ... - - [31/Mar/2010:05:24:18 -0700] "GET ... - - [31/Mar/2010:05:24:40 -0700] "GET ... - - [31/Mar/2010:05:25:17 -0700] "GET ... - - [31/Mar/2010:05:27:38 -0700] "GET ... - - [31/Mar/2010:05:27:42 -0700] "GET ... - - [31/Mar/2010:05:32:16 -0700] "GET ...
Output Sample:
unique IP number is 7
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file(log file) 
2. ctrl-h open replace window 
* set 'Replace Unit' to 'Line' 
* click 'Advanced' page 
set "Run following at the beginning of replace" to: 
set "Run following for each matched unit" to: 
set "insert end text" to: 
3. click 'Replace', done! 
Download Script:  scripts/

Screenshot 1:  Replace_Window

Screenshot 2:  Replace_Advanced_Window

Similar Examples:
How to count the number of records for each month in a web log file? (71%)
How to count the number of ip addresses from each country? (66%)
How to count the number of words for many files and append result to each file? (65%)
How to count number of words appeared in a text file? (65%)
How to sort all lines of ip addresses in a text file? (62%)
How to count number of digits(0-9) in a text file? (62%)
How to count how many IP addresses with different classes from web logs? (60%)
How to extract all IP address from a text file? (60%)

Check Demo of Count and statistics
count the number of unique ip ad  count the number of unique ip address  unique ip  toc  unique  pages  insert end text  insert end  ip address  statistics  count number for statistics  insert beginning  insert text at beginning  beginning end  insert end of file  replace text number count  insert text from file  insert text end text