Tired of downloading zip or tar files, decompressing, and then having to delete the compressed file ?
Do it all in one step with this Tip
-
Copy and paste this function into your .bashrc (or in my case as I used .zsh, .zshrc):
123dunzip() {wget -qO- $1 | bsdtar -xvf-;}
- Then type the following in your terminal:
123source ~/.bashrcIf you are using zsh, substitute “.zshrc” for .bashrc.
Works for zip and gzipped tar files.
Example
For details on this command see this stack exchange answer to How to redirect output of wget as input to unzip? by ruario.
Regarding functions and how to use them see with arguments see Make a Bash alias that takes a parameter?.