カールコマンドを終了しますか?

カールコマンドを終了しますか?
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再起動してください。次に、各提案が正しく終了したことを確認してください。

プロンプト>2番目の通知$PS2)。現在のコマンドを完了するために、より多くの入力が必要な状況で表示されます。あなたの場合、開いた二重引用符があるので、閉じるのを待っています。

このプロンプトが表示される別の状況は次のとおりです。

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

doneコマンドを入力して押すまではコマンドは完了しないため、シェルがEnter半分だけ入力したコマンドを実行するのではなく、入力を介してループを完了すると予想します。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

おすすめ記事