Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要从一个array[0]-解析链接,array[3]这些链接都是 URL,然后发送到一个 cURL 的 for 循环,并将下载 html 并将其拍摄到另一个数组。得到错误no URL specified!
array[0]
array[3]
no URL specified!
echo "${array[0]}" for i in ${array[@]} do dataset=($(curl -d \ $i)) done
两件事,-d一个帖子,你表示你想下载。追加到数组就像+=(). 你可以这样做:
-d
+=()
dataset=() for i in ${array[@]} do dataset+=($(curl --silent $i)) done