【问题标题】:Batch: echo to standard out without carriage return line feed批处理:回显到标准输出,无需回车换行
【发布时间】:2012-08-10 05:34:30
【问题描述】:

我认为这很简单,但显然不是。我见过的所有关于如何做到这一点的例子都是重定向到一个文件。我需要回显到标准输出。

    @echo off
    set test = testText
    set test2 = MoreText
    echo %test%%test2%

然后通过另一个批处理文件读入标准输出,最后它在 CR LF 上阻塞。

【问题讨论】:

    标签: batch-file return line feed


    【解决方案1】:

    TSCMD015 FAQ 中我最喜欢的方法是使用

    @echo off
    set test = testText
    set test2 = MoreText
    set /p="%test%%test2%"<nul
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-29
      • 1970-01-01
      • 1970-01-01
      • 2012-11-17
      • 1970-01-01
      相关资源
      最近更新 更多