我有一个超过 200 行的文本文件,我只想在第 4 行之前添加一个新行。我使用的是 Windows XP。
输入前的示例文本文件:
header 1
header 2
header 3
details 1
details 2
输出后:
header 1
header 2
header 3
<----- This is new line ---->
details 1
details 2
最佳答案
我相信你正在使用
echo Text >> Example.txt
功能?
如果是这样,答案就是简单地添加一个“.”。 (点)直接在回声之后,没有其他任何东西。
例子:
echo Blah
echo Blah 2
echo. #New line is added
echo Next Blah
关于windows - 使用 Windows 批处理文件在文本文件中添加新行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7396680/