使用 curl 为 url unshortening 插入延迟

Inserting delays using curl for url unshortening

我正在使用以下脚本来缩短文件中的 urls: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 & wait

现在我的文件 shortened_urls.txt 包含 4000 urls。我怎样才能在每个 url 未缩短后插入 1 秒的等待时间。

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

把这部分放到resolve-url.sh

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