After merging 1000 or more lines, how to turn them back into the original individual lines??
for /f "delims=;????" %i in (merged.txt) do echo ????? >new.txt
?????
for /f "delims=;????" %i in (merged.txt) do echo ????? >new.txt
?????
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
set fso=createobject("scripting.filesystemobject")
set file=fso.opentextfile("b.txt")
s=file.readall
file.close
set file=fso.createtextfile("c.txt")
file.write replace(s,";",vbcrlf)
file.close
msgbox "Restore successful",4096
Originally posted by amao at 2007-2-4 17:33:
sed "s/ ;/\n/g" 合并成一行的.txt> 输出结果单行的.txt
Can't see how it is implemented
Originally posted by vkill at 2007-2-4 18:02:
Can't see how it's implemented
Originally posted by amao at 2007-2-4 04:33 AM:
sed "s/ ;/\n/g" 合并成一行的.txt> 输出结果单行的.txt
Originally posted by 3742668 at 2006-7-19 09:39 AM:
In practical applications of batch processing, it is recommended not to use too many variables.
for /f "delims=" %i in (source file.txt) do @set /p "var=%i;" <nul >>target file.txt
Using set /p "variable=display content" <nul to replace echo display content, the output does not automatically wrap lines. Wonderful, I didn't expect set can be used like this :D
[ Last edited by lbqldos on 2007-2-4 at 02:43 PM ]