You mention
.zip files.
As far as I know gunzip doesn't handle .zip files, and unzip doesn't output to a pipe (stdout). So I think green_dragon's solution doesn't work in the case of
.zip files.
But there is a way around this that doesn't wait until
all files are downloaded, but start unzipping a file in the background as soon as it is downloaded, and then waits until all are done downloading
and unzipping. It works by starting sub-shells (bash in this example) in the background, each of which downloads a file and then unzipping it. Try something like:
Code:
#!/bin/bash
URL1="http://www.site.com/pricelist1.zip"
URL2="http://www.nextsite.com/pricelist2.zip"
URL3="http://www.thirdsite.com/pricelist3.zip"
URL4="http://www.fourthsite.com/pricelist4.zip"
(curl -s -o list1.zip $URL1 ; echo 'got #1' ; unzip -qq list1.zip ; echo '#1 done')&
(curl -s -o list2.zip $URL2 ; echo 'got #2' ; unzip -qq list2.zip ; echo '#2 done')&
(curl -s -o list3.zip $URL3 ; echo 'got #3' ; unzip -qq list3.zip ; echo '#3 done')&
(curl -s -o list4.zip $URL4 ; echo 'got #4' ; unzip -qq list4.zip ; echo '#4 done')&
wait
echo DONE!
However if it is
.gz files you meant, it's probably better to stick with green_dragon's solution.