Q:

Inserting delays using curl for url unshortening

I am using the following script to unshorten urls in my file : 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

Now my file shortened_urls.txt contains say 4000 urls.  How can I insert some waits of say 1 second after each url is unshortened. 

A:

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

Put this part to resolve-url.sh
And invoke cat shortened_urls.txt | xargs -n 1 sh ./resolve-url.sh

