| 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 |