中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-07 01:53
48,040 topics / 350,125 posts / today 1 new / 48,252 members
DOS批处理 & 脚本技术(批处理室) » [Help] How can DOS merge matching lines from two files
Printable Version  700 / 4
Floor1 wjcing Posted 2007-12-27 18:14
初级用户 Posts 59 Credits 71
If there are two files, 1.txt and 2.txt
Contents of 1.txt:
a1
b1
c1
d1
e1
Contents of 2.txt:
a2
b2
c2
d2
e2
Merge them into 3.txt
[1]a1[2]a2[3]
[1]b1[2]b2[3]
[1]c1[2]c2[3]
[1]d1[2]d2[3]
[1]e1[2]e2[3]
Floor2 wjcing Posted 2007-12-27 18:17
初级用户 Posts 59 Credits 71
Experts, please help me out... thanks...
Floor3 wjcing Posted 2007-12-27 18:19
初级用户 Posts 59 Credits 71
I originally had one txt file and split it into three files
for /f %%i in (a1.txt,a3.txt,a5.txt) do echo %%i>>a1.txt
Now I want to merge them in the above format....
Floor4 lxmxn Posted 2007-12-27 23:13
版主 Posts 4,938 Credits 11,386
Floor5 wjcing Posted 2007-12-28 09:56
初级用户 Posts 59 Credits 71
Many thanks.. moderator lxmxn
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023