『楼 主』:
条件文本文件替换[已解答]
使用 LLM 解释/回答一下
有2个TXT文件:ab.txt 和 cd.txt
ab.txt文件内容如下:
姓名"张三",ID'102' ,tel'0102211',0,25,11
姓名"李似答",ID'102' ,tel'0202211',0,25,11
姓名"王二",ID'102' ,tel'01023311',0,25,11
........
cd.txt文件内容如下:
赵括
王彬
李铃
.......
可否用批处理命令来完成从cd.txt文件每行提取名字来替换ab.txt文件中的每行的姓名内容.做到最后生成的ab.txt文件如下:
姓名"赵括",ID'102' ,tel'0102211',0,25,11
姓名"王彬",ID'102' ,tel'0202211',0,25,11
姓名"李铃",ID'102' ,tel'01023311',0,25,11
........
Last edited by 123cainiao on 2007-9-25 at 01:36 PM ]
There are 2 TXT files: ab.txt and cd.txt.
The content of ab.txt is as follows:
Name "Zhang San", ID '102', tel '0102211', 0, 25, 11
Name "Li Sida", ID '102', tel '0202211', 0, 25, 11
Name "Wang Er", ID '102', tel '01023311', 0, 25, 11
........
The content of cd.txt is as follows:
Zhao Kuo
Wang Bin
Li Ling
.......
Can batch processing commands be used to extract the name from each line of cd.txt to replace the name content in each line of ab.txt. So that the finally generated ab.txt file is as follows:
Name "Zhao Kuo", ID '102', tel '0102211', 0, 25, 11
Name "Wang Bin", ID '102', tel '0202211', 0, 25, 11
Name "Li Ling", ID '102', tel '01023311', 0, 25, 11
........
Last edited by 123cainiao on 2007-9-25 at 01:36 PM ]
|