开发者

adding a line at the end of the .bat file ignoring the newline

I have a .bat file with the following structure:

istruction1[newline]

I would like to append some parameters in a way that the resulting file is:

开发者_开发问答
istruction1 param

currently i have:

istruction1[newline]
param

Basically I want to get rid of the newline...how can I do that?

thanks a lot!


Try this one:

@echo off
for /f "delims=" %%i in (my.bat) DO echo %%i param

This little script will append param at the end of every (non empty) line in your input file (my.bat). You can also issue that directly from the command line, simply substituting %% with a single %:

for /f "delims=" %i in (my.bat) DO echo %i param
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜