Windows batch: echo without new line

后端 未结 18 1440
失恋的感觉
失恋的感觉 2020-11-22 04:01

What is the Windows batch equivalent of the Linux shell command echo -n which suppresses the newline at the end of the output?

The idea is to write on t

18条回答
  •  被撕碎了的回忆
    2020-11-22 04:41

    Using set and the /p parameter you can echo without newline:

    C:\> echo Hello World
    Hello World
    
    C:\> echo|set /p="Hello World"
    Hello World
    C:\>
    

    Source

提交回复
热议问题