【发布时间】:2023-03-18 12:55:01
【问题描述】:
为什么不从标准输入读取 Windows Shell (cmd.exe) 内置命令? (或者看起来)
例子:
echo bar | set /p foo=
【问题讨论】:
-
set /p本身确实从标准输入读取。在该示例中,它只是通过管道输入。 -
先看this answer,再看整个话题……
标签: batch-file cmd command-prompt windows-shell