For the existing text a.txt, the line numbers should not start from 1, but should start flowing from a specified value (for example 20), and a "+" symbol should be added at the end of each line number. The link below doesn't meet this requirement,
http://www.cn-dos.net/forum/viewthread.php?tid=30749&fpage=1&highlight=txt
I referred to and modified some expert's P below, but found that every line in A.txt gets numbered 20~100. Please advise.
for /f %%a in (a.txt) do (
for /L %%b in (20,1,100) do (
echo %%b +%%a >> b.txt
)
)
Solved, many thanks to the friend in reply #2
[ Last edited by userwww on 2007-10-10 at 10:36 PM ]
http://www.cn-dos.net/forum/viewthread.php?tid=30749&fpage=1&highlight=txt
I referred to and modified some expert's P below, but found that every line in A.txt gets numbered 20~100. Please advise.
for /f %%a in (a.txt) do (
for /L %%b in (20,1,100) do (
echo %%b +%%a >> b.txt
)
)
Solved, many thanks to the friend in reply #2
[ Last edited by userwww on 2007-10-10 at 10:36 PM ]
