我有一个名为file.txt的文件,其中包含:
this is line one ^
this is line two ^
this is the last line
Run Code Online (Sandbox Code Playgroud)
我怎么能把它变成env var?
我可以从批处理文件中执行此操作:test.bat
set LF=^
[blank line]
[blank line]
rem two blank lines needed above
set multi=Line 1!LF!Line 2!LF!Last line
echo !multi!
Run Code Online (Sandbox Code Playgroud)
这输出三行:
Line 1
Line 2
Last line
Run Code Online (Sandbox Code Playgroud)
那么如何在批处理文件中将file.txt导入envvar?