Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 如何在一定程度上逃逸每个角色?_Batch File_Command Line - Fatal编程技术网

Batch file 如何在一定程度上逃逸每个角色?

Batch file 如何在一定程度上逃逸每个角色?,batch-file,command-line,Batch File,Command Line,情况: set command=echo File used by cleaning executable ^>^> dummyfile %command% 我希望一个变量包含一个命令,以便执行该命令: %command% 尝试: set command=echo File used by cleaning executable ^>^> dummyfile %command% 这是可行的,但是我必须为每个命令做特定的编辑。。。 在=符号之后是否有一些东西将全部用作

情况:

set command=echo File used by cleaning executable ^>^> dummyfile
%command%
我希望一个变量包含一个命令,以便执行该命令:

%command%
尝试:

set command=echo File used by cleaning executable ^>^> dummyfile
%command%
这是可行的,但是我必须为每个命令做特定的编辑。。。 在=符号之后是否有一些东西将全部用作引号

set command="echo File used by cleaning executable >> dummyfile"
%command%

然后,由于引号,命令无法识别

您对引号的想法并没有那么糟糕:

set "command=echo File used by cleaning executable >> dummyfile"