| User: editor -- 2010-04-08 << 470 472 >> |
| Hits: 3951 |
| Type: Count and statistics |
| Search all Count and statistics 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" 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/471.rst.zip |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |