Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1332.Text data calculation -- How to compare and get the difference between numbers of two file?

User: yong chen -- 2015-12-17          << 1331  1333 >>
Hits: 1078
Type: Text data calculation   
Search all Text data calculation examples
Description:
I have two txt file, I want compare the number changed
Input Sample:
text one:  AAA 5
           BBB 3
           CCC 2

text two:  AAA 8
           BBB 1
           CCC 5
Output Sample:
 AAA 3
 BBB -2
 CCC 3
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume file one.txt is in folder: d:\test\
1. ctrl-o open file two.txt
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'replace with pattern' to:

* click 'advanced' tab, set 'run following at the beginning of replace' to:

3. click 'replace', done.

Note:
you must use double backslash as folder delimiter like d:\\test\\one.txt in step 2

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to count and sort the occurrence of different numbers in a text file? (64%)
How to parse all the fields in different segment from a text file? (62%)
How to find out the top 5 largest and distinct numbers in a text file? (61%)
How to extract all telephone numbers from a text file? (56%)
How to split different groups of continuous numbers into different files? (55%)
How to merge two or more csv files with different columns into one file? (55%)
How to count the frequency of numbers base on the value range? (54%)
How to extract specified lines in different section of text file? (53%)

Check Demo of Text data calculation
Keywords:
difference  compare  backslash  double  comp  slash  spaces  key  two  pare  between spaces  delimiter calculation  between two words  compare file  file compare  use key  double words  replace tab spaces