I have to download a file from this link. The file download is a zip file which I will have to unzip in the current folder.
Normally, I would download it first, then run the unzip command.
wget http://www.vim.org/scripts/download_script.php?src_id=11834 -O temp.zip
unzip temp.zip
But in this way, I need to execute two commands, wait for the completion of first one to execute the next one, also, I must know the name of the file temp.zip
to give it to unzip
.
Is it possible to redirect output of wget
to unzip
? Something like
unzip < `wget http://www.vim.org/scripts/download_script.php?src_id=11834`
But it didn't work.
bash: `wget http://www.vim.org/scripts/download_script.php?src_id=11834 -O temp.zip`: ambiguous redirect
Also, wget
got executed twice, and downloaded the file twice.