templates - Windows 批处理的heredoc?

标签 templates batch-file heredoc

有没有一种方法可以批量指定多行字符串,类似于unix shell中的heredoc。类似于:

cat <<EOF > out.txt
bla
bla
..
EOF

这个想法是从模板文件创建自定义文件..

最佳答案

据我所知,没有。

据我所知最接近的是

> out.txt (
    @echo.bla
    @echo.bla
    ...
)

(@ 阻止命令 shell 本身打印它正在运行的命令,而 echo. 允许您以空格开始一行。)

关于templates - Windows 批处理的heredoc?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1015163/

相关文章:

powershell - 如何以管理员身份并使用批处理文件中的参数运行 PowerShell?

c++ - 为什么必须在哪里放置 “template”和 “typename”关键字?

windows - 如何从包含批处理脚本中分隔符分隔的文本的文件中解析一行

c++ - 具有返回类型的函数模板,不能从参数中推导出

batch-file - 如何在批处理文件中退出 SET/p

ruby - 如何防止 capistrano 替换换行符?

Bash 和 Docker : strange heredoc behavior with read loop

bash - 如何不将此处文件回显到终端?

c++ - 通过 static_assert 强制执行模板类型

Django模板: custom template tag to display dictionary of dictionary