don*_*nny 0 unix bash shell parsing curl
我需要GET来自服务的数据.我正在传递一堆ID.
id存储在以逗号分隔的文件中
示例:cat id_file
1,2,3,4,5,6,7,8,9,10,.....10000.
Run Code Online (Sandbox Code Playgroud)
文件中有数千个ID.
在我的shell脚本中我使用
id_list=$(cat id_file)
curl -H "Authorization: Bearer $token" -X GET "http://prk.xyx.com/tpt/abc/v2/dce_info?Id=$id_list&mpId=0" > op_data.json
Run Code Online (Sandbox Code Playgroud)
curl命令失败并显示错误 "/usr/bin/curl: Argument list too long".
现在POST我们可以指定卷曲@filename.我们可以为获取请求做些什么吗?