开发者

DOS batch: force echo of single statement?

In my DOS batch file, 开发者_如何学CI use the "@" symbol to suppress the echo of that statement before execution when echo is ON.

How should I force the echo of a statement when echo is OFF (I'm hoping for another single character, but all answers welcome)?


It seems to me that there is no way to do it. You can wrap commands you need to be echoed between echo on and @echo off but this is ugly, I think. Another option is to keep echo on and use @ for every command you don't want to echo and keeping echo-ables without @.


Here is a not as powerful solution as @ : surround the commands you want to echo by "echo on" then "echo off".

@echo on
your commands
@echo off
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜