批量相当于击的反引号 [英] Batch equivalent of Bash backticks
本文介绍了批量相当于击的反引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在使用bash的工作,我可以把一个命令的输出到像这样另一个命令:
When working with Bash, I can put the output of one command into another command like so:
my_command `echo Test`
将是同样的事情
my_command Test
(显然,这仅仅是一个非实际例子。)
(Obviously, this is just a non-practical example.)
我只是想知道如果你能做到同样的事情在批次。
I'm just wondering if you can do the same thing in Batch.
推荐答案
您可以首先将输出重定向到一个文件中做到这一点。例如:
You can do it by redirecting the output to a file first. For example:
echo zz > bla.txt
set /p VV=<bla.txt
echo %VV%
这篇关于批量相当于击的反引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文