如何使用多行和/创建文件-Windows命令提示符


0

如何创建包含多行/和“的文件?

我正在尝试创建一个scss文件,其中文本有多行,并且/和“有没有办法,我没有

这是我一直在工作的代码:

echo '
//== IMPORTS
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

@import "global/variables/_v-base.scss";
@import "global/variables/_v-sitenamegoeshere2018.scss";
@import "_base.scss";


//== THEME SPECIFIC STYLES ' > site.scss

Answers:


0

输出文件中的一行==一echo

每个echo文件都必须具有自己的文件重定向(first-output >,non-first-append >>)。

特殊符号必须在^符号前面加上符号。

要输出空行,请使用echo.

@echo off
echo //== IMPORTS > site.scss
echo //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >> site.scss
echo. >> site.scss
echo @import "global/variables/_v-base.scss"; >> site.scss
echo @import "global/variables/_v-sitenamegoeshere2018.scss";>> site.scss
echo @import "_base.scss"; >> site.scss
echo. >> site.scss
echo. >> site.scss
echo //== THEME SPECIFIC STYLES >> site.scss

这根本不是真的:Each echo must have its own redirection to file如果将回声命令(代码块)括在括号中,则可以对代码块进行一次重定向,(echo foo&echo bar) >site.scss更容易阅读。
LotPings
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.