结束卷曲命令?

结束卷曲命令?
curl "https://dummy.net/v1/users/titles/privacy'
> -XGET \
> -H ‘Referer:https://dummy.net/friday/?f’ \
> -H ‘Authorization:Bearer xxxxxxxxxxxxxxx’ \
> -H ‘User-Agent:Mozilla/5.0 (PlayStation 4 7.00) ’ \
> -H ‘Accept-Language:en-US’

这里我怎样才能关闭命令并运行它?

答案1

您忘记关闭在命令第一行打开的双引号字符串(您在 URL 末尾使用了单引号,可能是错误的)。只需按下Ctrl+C并重新开始。然后确保正确关闭每个报价。

提示符>二次提示( $PS2)。它在需要更多输入才能完成当前命令的情况下显示。就您而言,您有一个开放的双引号,因此它正在等待您关闭它。

这是出现该提示的另一种情况:

$ for str in hello world
> do
> echo "$str"
> done
hello
world

done直到我键入并按下 后,该命令才完成,因此shellEnter不会尝试运行已输入一半的命令,而是希望我通过键入 来完成循环。for str in hello worlddone

或者,接近你实际做的事情:

$ echo "hello
> this is line 2
> Quotes like 'these' don't matter
> because we have an un-closed double quote at the start
> Now, we'll close it"
hello
this is line 2
Quotes like 'these' don't matter
because we have an un-closed double quote at the start
Now, we'll close it

相关内容