小编Gau*_*ava的帖子

将文件中包含的 URL 列表传递给 curl

我必须在多个文件上设置 ACL。我已经下载了使用以下命令存储的对象列表。

C:\Users\Gshrivastava\Downloads\curl_748_0>curl  -o urlname.csv -i -k -H "Authorization: HCP bXFl:29def7dbc8892a9389ebc7a5210dd844" -H "Content-Type: application/xml" -H "Accept:application/xml" -d @mqe.xml "http://tenant.hcp3.hdsblr.com/query?prettyprint
Run Code Online (Sandbox Code Playgroud)

然后我将 url 名称分类到一个文本文件中。

ns.tenant.hcp3.hdsblr.com/rest/pic/Cat/images.jpg 
ns.tenant.hcp3.hdsblr.com/rest/pic/Cat/6.png 
ns.tenant.hcp3.hdsblr.com/rest/pic/landscape/9.png 
ns.tenant.hcp3.hdsblr.com/rest/pic/landscape/5.png  
Run Code Online (Sandbox Code Playgroud)

文本文件的内容 >

现在我想将此文件用作参数或变量,以便使用 ACL 设置所有文件名。

curl.exe -k http://ns.tenant.hcp3.hdsblr.com/rest/ACL/filename.ext/?type=acl -i -H "Authorization: HCP YWRtaW4=:29def7dbc8892a9389ebc7a5210dd844" -T acl.xml 
Run Code Online (Sandbox Code Playgroud)

command-line curl files

12
推荐指数
4
解决办法
4万
查看次数

标签 统计

command-line ×1

curl ×1

files ×1