Can I make unzip or any similar programs work on the standard output? The situation is I'm downloading a zip file, which is supposed to be unzipped on the fly.
Related issue: How do I pipe a downloaded file to standard output in bash?
compressionlinuxpipeUbuntu
Can I make unzip or any similar programs work on the standard output? The situation is I'm downloading a zip file, which is supposed to be unzipped on the fly.
Related issue: How do I pipe a downloaded file to standard output in bash?
Best Answer
While a zip file is in fact a container format, there's no reason why it can't be read from a pipe (stdin) if the file can fit into memory easily enough. Here's a Python script that takes a zip file as standard input and extracts the contents to the current directory or to a specified directory if specified.
This script can be minified to one line and created as an alias.
Now unzip the output of wget easily.