4
I frequently use wget to download tarballs and zip files from the web, then either untar then or gunzip them. I do:
wget google.com/somefile.zip
unzip somefile.zip
rm somefile.zip
Is there a way for me to automatically pass the zip file to tar or unzip WHILE wget-ting? In pseudocode:
wget google.com/somfile.zip && unzip
So this will work despite not giving unzip the file name of the document? If so, +1 and accepted. Nice and clean. – n0pe – 2011-06-09T14:41:06.393
Yeah, note the difference between
unzip
which acts on files andfunzip
which acts onstdin
. – slhck – 2011-06-09T14:43:25.087ahhh yeah I didn't see that. Many thanks! – n0pe – 2011-06-09T14:47:31.907
@MaxMackie yes, the
-O -
means 'output to stdout'. There is no file, no document. There's just a pipe directly tofunzip
which will extract to the CWD. – Rich Homolka – 2011-06-09T14:47:52.983I do rather like this one better than my answer. I've never run across funzip before! Thanks! – Kirk – 2011-06-09T14:56:51.410