Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

684.Advanced search and replace -- How to find out the top 5 largest and distinct numbers in a text file?

User: editor -- 2010-12-27          << 683  685 >>
Hits: 305
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to find out the top 5 maximum numbers in a text file containing numbers?
Input Sample:
998
23
56
173
254
421
863
129
66
342
3
345
5
556
Output Sample:
998
863
556
421
345
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text files
2. ctrl-h open replace window
* set 'replace with pattern' to:

3. click 'replace', done.
4. ctrl-s save to file

Note: 'uniq' option will ignore any duplicated values.

Screenshot 1:  Replace_Window


Similar Examples:
How to find the 5 largest number from a text file automatically? (69%)
How to count and sort the occurrence of different numbers in a text file? (67%)
How to count the occurrence of a list of words in a text file? (59%)
How to add a port 80 for all IP addresses in a text file? (59%)
How to extract all telephone numbers from a text file? (58%)
How to count how many characters, punctuations in a text file? (58%)
How to add a leading zero to all 4 digit numbers in multiple files? (57%)
How to sort all lines of ip addresses in a text file? (57%)

Check Demo of Advanced search and replace
Keywords:
maximum  duplicated  max  duplicat  dupl  duplicate  ignore  find  values  containing  find 5 largest numbers  find and replace maximum  find and replace text with a  find pattern in file replace  find text  replace ignore  find and replace  find replace