在cmd之前的管道前面的正斜杠是做什么去除回声的行尾? [英] What does a forward slash before a pipe in cmd do to remove the line ending of an echo?
问题描述
此代码:
@echo off
echo/|set /p ="Executing backup...."
echo/|set /p =" backup procedure"
...从回声在同一行,并在cmd窗口中产生以下输出:
... came from Echoing in the same line and produces the below output in a cmd window:
Executing backup....backup procedure
然而,我似乎没有找到一个解释通过谷歌在正斜线对¿管道?
导致 set 的输出为
echo
ed code>
However, I cant seem to find an explanation through google on what the forward slash does to the ¿pipe?
to cause set
's output to be echo
ed to the console / stdout
如果任何人也可以建议一个好的网站学习更多关于 cmd
/ <$ c
If anyone could also suggest a good website for learning more about cmd
/ cmd
programs' features like this, it would be appreciated.
推荐答案
护理
1)echo打印set / p = ...的结果,带/不带/之前的管道,所以我不知道你的问题是什么。
1) echo prints the result of set /p =... with or without the / before the pipe, so I'm not sure what your question is asking
2)(它也将打印set / p = ...回声之后随机垃圾,因为它读取管道的东西,而不是它接收的参数。)
2) (It will also print set /p =... with random junk after the echo, too, since it's reading the piped stuff and not the arguments it receives.)
因此,我建议您修改引用的SO职位,以防其他人混淆。
I will hence suggest edits to the referenced SO post, to prevent others confusion.
这篇关于在cmd之前的管道前面的正斜杠是做什么去除回声的行尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!