解释Windows批量换行变量hack的工作原理

解释Windows批量换行变量hack的工作原理

有人可以解释这是如何工作的吗?

@echo offREM Creating a Newline variable (the two blank lines are required!)set NLM=^set NL=^^^%NLM%%NLM%^%NLM%%NLM%REM Example Usage:echo There should be a newline%NL%inserted here.

发出:

There should be a newlineinserted here.


长风秋雁
浏览 651回答 2
2回答

ibeautiful

似乎有一种方法也适用于管道:(echo 1st line^&echo 2nd line) | sort
打开App,查看更多内容
随时随地看视频慕课网APP