I have a text file with a list of urls I want to download. I want wget to wait before downloading the next url. I'm using cat urls.txt | xargs -n1 -i wget --wait=30 {}However there is no wait between urls. Can I use wget's --wait option for this? Other alternatives?
How to use wget --wait option when using input from a file?
wget
It's because wget is newely invoked for each url. Use the -i option to feed a list of URLs to wget:$ wget -i urls.txt --wait=30From the manual:-i file--input-file=fileRead URLs from a local or external file. If - is specified as file,URLs are read from the standard input. (Use ./- to read from a fileliterally named -.)  If this function is used, no URLs need be presenton the command line. If there are URLs both on the command line and inan input file, those on the command lines will be the first ones to beretrieved. If --force-html is not specified, then file should consistof a series of URLs, one per line.However, if you specify --force-html, the document will be regarded ashtml. In that case you may have problems with relative links, whichyou can solve either by adding <base href=url> to the documents orby specifying --base=url on the command line.If the file is an external one, the document will be automaticallytreated as html if the Content-Type matches text/html. Furthermore,the file's location will be implicitly used as base href if none wasspecified.