User: xiaoming -- 2014-11-08 << 1262 1264 >> |
Hits: 2989 |
Type: Text generator |
Search all Text generator examples |
Description: |
File a contain N lines, file b contain M lines, how generate an N*M lines file, each line is the combination line from each file? |
Input Sample: |
a.txt aa bb cc b.txt 1 2 3 ... 10 |
Output Sample: |
=============== output 1: c.txt aa1 aa2 aa3 .. aa10 bb1 bb2 .. bb10 cc1 cc2 .. cc10 =============== output 2: 1.txt, 2.txt, 3.txt 1.txt aa1 aa2 aa3 .. aa10 2.txt bb1 bb2 bb3 ... bb10 3.txt cc1 cc2 cc3 ... cc10 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. put a.txt and b.txt to folder d:\test\ 2. open "replace pioneer", ctrl-o open a.txt 3. 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: * set 'run following for each matched unit' to: 4. click 'replace', file 1.txt, 2.txt, 3.txt will be write to d:\test\ folder 5. ctrl-s save to file c.txt Note: you should write doube backslash in step 3, like "d:\\test\\b.txt" |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |