Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

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

User: editor -- 2010-04-08
Hits: 84
Type: Character count   
Search all Character count examples
Description:
How to count the number of Unique IP address from a web log file?
Input Sample:
171.81.208.129 - - [31/Mar/2010:05:21:55 -0700] "GET ...
63.249.65.186 - - [31/Mar/2010:05:22:35 -0700] "GET ...
107.46.204.179 - - [31/Mar/2010:05:24:18 -0700] "GET ...
61.55.207.120 - - [31/Mar/2010:05:24:40 -0700] "GET ...
107.46.204.179 - - [31/Mar/2010:05:25:17 -0700] "GET ...
122.125.66.40 - - [31/Mar/2010:05:27:38 -0700] "GET ...
122.125.66.109 - - [31/Mar/2010:05:27:42 -0700] "GET ...
210.136.28.167 - - [31/Mar/2010:05:32:16 -0700] "GET ...
Output Sample:
unique IP number is 7
Answer:
Hint: You need to Download and install "Replace Pioneer" 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/471.rst.zip

Similar Examples:
How to count number of words appeared in a text file? (65%)
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%)
How to count how many IP addresses are appearing in  a text file? (60%)
How to count the number of ( A )...( F ) from a text file of survey? (58%)
How to count the number of words that start with "ea" in a text file? (57%)
Can I count the frequency of each word in a text file? (56%)

Check Demo of Character count