使用curl插入延迟以进行网址不变

时间:2015-12-25 10:12:43

标签: linux url curl xargs

我使用以下脚本在我的文件中取消删除网址:shortened_urls.txt

  

cat shortened_urls.txt | xargs -n 1 curl -x 23.100.73.22   samemon:PasSworD@myprivateproxy.net:15213 -Ls -I -o / dev / null -w   %{url_effective}'\ n'> unshortened.txt&等待

现在我的文件shortened_urls.txt包含4000个网址。如何在每个网址未被缩短后插入一些等待1秒的等待。

1 个答案:

答案 0 :(得分:0)

curl -x 23.100.73.22 samemon:PasSworD@myprivateproxy.net:15213 -Ls -I -o /dev/null -w %{url_effective}'\n' $1 >> unshortened.txt; sleep 1

将此部分放入resolve-url.sh

并调用cat shortened_urls.txt | xargs -n 1 sh ./resolve-url.sh