gpt4 book ai didi

linux - SUSE Linux 终端无法识别某些字符,例如 "&"、 "?"、 "/"

转载 作者:太空宇宙 更新时间:2023-11-04 05:44:12 33 4
gpt4 key购买 nike

当我在终端中运行它时

curl https://api.box.com/2.0/folders/{id}/items?limit=100&offset=0 -H "Authorization: Bearer access_token" 

使用有效的access_token,它会给我这个响应。

If '-H' is not a typo you can run the following command to lookup the package that contains the binary: 
command-not-found -H
-bash: -H: command not found

我使用的是 SUSE Linux Enterprise Server 11 SP3。

最佳答案

您提到的所有这些字符都必须转义,以防止它们被 bash 解释。

例如,而不是:

curl https://www.example.com/r?v=1&w=2

您需要使用:

curl https://www.example.com/r\?v=1\&w=2
^^ ^^

就您而言:

curl https://api.box.com/2.0/folders/\{id\}/items\?limit=100\&offset=0 -H "Authorization: Bearer access_token" 
^^ ^^ ^^ ^^

关于linux - SUSE Linux 终端无法识别某些字符,例如 "&"、 "?"、 "/",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29411731/

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