【发布时间】:2018-12-24 19:54:17
【问题描述】:
我正在尝试使用 GitHub API 创建问题,作者:
curl -u $username -d '{"title" : "Big Files List" , "body" : "'$(find -type f -size +1M)'", "label" : "big files" } $URL -k'
但是,我得到了像
这样的响应curl: (3) [globbing] unmatched close brace/bracket at pos 56
{
"message": "Invalid request.\n\nFor 'links/0/schema', \"body\" is not an
object.",
"documentation_url":
"https://developer.github.com/enterprise/2.15/v3/issues/#create-an-issue"
}
所以问题在 $(find -type f -size +1M) 之内,当我用字符串替换时,没有问题。
【问题讨论】:
-
find正在返回多个文件名,因此-d参数被拆分为多个参数。
标签: linux shell unix github-api github-api-v3