gpt4 book ai didi

Windows 命令提示符 : How to pass multi-line string parameters

转载 作者:可可西里 更新时间:2023-11-01 12:25:44 25 4
gpt4 key购买 nike

我有一个接受字符串参数的程序。我创建了一个执行程序的批处理文件和一个多行字符串参数。我在多行字符串之后还有第二个参数。

C:\>MyProgram "This is a
multiline text" parameter2

当我运行它时,只有字符串的第一行包含在命令中,后续行和第二个参数将被忽略。有没有办法传递多行字符串参数?

最佳答案

您的问题与 - Windows: How to specify multiline command on command prompt?

In the Windows Command Prompt the ^ is used to escape the next character on the command line.

For example, (the More? being a prompt):

C:\>cd "c:\Program Files" ^
More? "\Common Files"

C:\>MyProgram "This is a " ^
More? "multiline text" parameter2

关于Windows 命令提示符 : How to pass multi-line string parameters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11948025/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com