Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

693.Text sort -- How to sort lines of text file by comparing the sum of column1, 2 and 3?

User: editor -- 2011-01-07          << 692  694 >>
Hits: 421
Type: Text sort   
Search all Text sort examples
Description:
How to sort lines of text file by the comparing the sum of column1,2 and 3?
Input Sample:
1 4 5
2 9 7
3 1 3
4 6 2
5 3 9
Output Sample:
3 1 3
1 4 5
4 6 2
5 3 9
2 9 7
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open replace window
* set 'replace with pattern' to:

* click 'advanced' tab, fill "run following at the beginning of replace" like:

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

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to sort all the lines of a text file by order the multiple columns? (69%)
How to split a csv file according to the value of column A? (62%)
How to split a text file according to first word in each line? (60%)
How to sort the lines in a text files by the order of line length? (60%)
How to sort all the lines of a text file randomly? (60%)
How to sort many lines by comparing the second word in each line? (59%)
How to extract all numbers in a text file, and provide a summary of number at the end? (59%)
How to split a CSV file with Header according to value of a column? (58%)

Check Demo of Text sort
Keywords:
sort lines of text  comp  return  sort line  sub  text sort  at the beginning  beginning  sum  sort  sort text lines  text sort open source  open source text file sort  sort file  replace text pattern  text pattern  and replace text  replace text