java逐行读取文本文件,并将这些行插入到输出文件的d=序列之后
I have an input file like below. An input file contains list of 8 digit numbers separated by comma. For that we need to read input file mentioned below.
12345678,
12345679,
12345680,
12345681,
12345682,
12345683,
12345684,
12345685
as i have to read the above file. I need to insert first value after -d= sequence,second value at -d= sequence and so on...
finally output file must be:
D:\data\12345678.pdf -d=12345678
D:\data\12345679.pdf -d=12345679
D:\data\12345680.pdf -d=12345680
D:\data\12345681.pdf -d=12345681
D:\data\12345682.pdf -d=12345682
D:\data\12345683.pdf -d=12345683
这里的路径和文件名各不相同。但主要目标是只在每行的-d=序列之后插入这些值
How can i achieve this?
谢谢你的帮助
# 1 楼答案
实现这一点的一个方法是