-1

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.

1 Answers1

1
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

alamar
  • 18,729
  • 4
  • 64
  • 97
  • I get the following : curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information curl: no URL specified! – Shahan Ali Memon Dec 25 '15 at 21:14
  • @ShahanAliMemon oh, I've fixed the text, you should add $1 for curl to see. – alamar Dec 25 '15 at 21:28