User: editor -- 2010-04-19 << 481 483 >> |
Hits: 2549 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to find out all line of text that either in A.txt only or B.txt only? I have to files A.txt and B.txt, how remove all the lines that appeared in both files, and copy the rest lines to C.txt? |
Input Sample: |
A.txt line 1 line 2 line 3 line 4 B.txt line 2 line 4 line 6 line 8 |
Output Sample: |
C.txt line 1 line 3 line 6 line 8 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open A.txt 2. select 'File->Load->Append File to Page' open B.txt, now A.txt and B.txt are joined together. 3. remove all lines that appear more than once: ctrl-h open 'Replace' dialog * in 'Replace with pattern', enter: click 'Advanced' tab: * in 'Run following for each matched unit' entry, enter: 4. click 'Replace', done! 5. ctrl-s save to file C.txt |
Download Script: scripts/482.rst.zip |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |