Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

183.Count and statistics -- How to analyze a log file and find out how many lines contain 'Pass' and how many lines contain 'Fail'?

User: editor -- 2008-06-09          << 182  184 >>
Hits: 474
Type: Count and statistics   
Search all Count and statistics examples
Description:
How to analyze a log file and find out how many lines contain 'Pass' and how many lines contain 'Fail'?
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
It's easy to do it automatically with Replace Pioneer:
1. ctrl-o open log file(text file)
2. ctrl-h open 'Replace' dialog

in 'Replace' page:
* set 'Replace Unit' to 'Line'
* set 'Search for Pattern' to:

* uncheck '[ ]Print unmatched unit' option

click 'Advanced' page:
* set 'Run following for each matched unit':

* set 'insert end text':


3. Click 'Replace', done.

Note: the result will be listed like:

Pass: 1234
Fail: 323
Download Script:  scripts/183.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to split a single line into many lines, keep two words for each line? (50%)
How to findout all lines that contain specified words in multiple files? (48%)
How to find out all files that contain both A and B and copy to a new folder? (48%)
How to split a file into many files by chapters, and use Chapter names as filenames? (48%)
How to remove all lines that contain ABC but not contain DEF in text file? (47%)
How to find out all files that contain all words of A, B and C? (47%)
How to find all lines in file A that contain words in file B? (46%)
How to extract all links which contain "shop" from many html files? (46%)

Check Demo of Count and statistics
Keywords:
pass  123  insert end text  insert end  automatically  automatic  automat  auto  find  statist  find and  find file  file insert  page out  contain match  file end  how to match