Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

796.Count and statistics -- How to count the number of records for each month in a web log file?

User: editor -- 2011-06-09          << 795  797 >>
Hits: 3159
Type: Count and statistics   
Search all Count and statistics examples
Description:
How to count the number of records for each month in a web log file?
Input Sample:
... 
125.17.148.179 - - [31/May/2011:21:58:54 -0700] "GET /s... 
210.94.41.89 - - [31/May/2011:23:16:02 -0700] "GET /ser... 
148.87.67.196 - - [01/Jun/2011:00:01:54 -0700] "GET /se... 
123.248.83.246 - - [01/Jun/2011:00:27:52 -0700] "GET /r... 
202.7.189.118 - - [01/Jun/2011:00:35:08 -0700] "GET /se... 
...
Output Sample:
3 Jun 
2 May 
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Pattern Counter" menu 
2. select option of "File/http", and input file name at the following entry 
3. click "Clear" to clear default pattern 
4. click "Add" to add a new pattern: 
Name: 
Pattern: 
click "ok" 
5. make sure "regular exp" option is selected. 
6. select the new added records, and click "Detail",the number of record for each months will be counted, click "copy" to copy the result to clipboard.

Screenshot 1:  Pattern_Counter_Window


Similar Examples:
How to count the number of Unique IP address from a web log file? (71%)
How to count the number of words that ended with "ing" in a text file? (69%)
How to count number of words appeared in a text file? (69%)
How to count the number of words that start with "ea" in a text file? (67%)
How to count the number of ip addresses from each country? (65%)
How to count the number of words with different length in an English article? (65%)
How to count number of digits(0-9) in a text file? (61%)
Can I count the frequency of each word in a text file? (61%)

Check Demo of Count and statistics
Keywords:
clipboard  records  month  oct  record  pattern counter  counter  nth  dec  statistics  record count  add record  count number for statistics  copy file name  copy file  copy a file  file copy  count the is