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

345 

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 compare and get the difference between numbers of two file? (59%)
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%)

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