Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xvoland/Extract
Bash/Zsh function for extract: .zip, .rar, .bz2, .gz, .zlib, .tar, .tbz2, .tgz, .Z, .7z, .xz, .exe, .tar.bz2, .tar.gz, .tar.xz, etc.
https://github.com/xvoland/Extract
archive archives arj bash bash-script command-line command-line-tool console-tool extract shell-script shell-scripts tar tgz utilities utility-scripts utils zlib zsh zsh-plugins zshrc
Last synced: 3 months ago
JSON representation
Bash/Zsh function for extract: .zip, .rar, .bz2, .gz, .zlib, .tar, .tbz2, .tgz, .Z, .7z, .xz, .exe, .tar.bz2, .tar.gz, .tar.xz, etc.
- Host: GitHub
- URL: https://github.com/xvoland/Extract
- Owner: xvoland
- License: mit
- Created: 2013-05-16T21:48:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T17:11:31.000Z (3 months ago)
- Last Synced: 2024-10-30T08:17:38.592Z (3 months ago)
- Topics: archive, archives, arj, bash, bash-script, command-line, command-line-tool, console-tool, extract, shell-script, shell-scripts, tar, tgz, utilities, utility-scripts, utils, zlib, zsh, zsh-plugins, zshrc
- Language: Shell
- Homepage:
- Size: 182 KB
- Stars: 472
- Watchers: 22
- Forks: 83
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Command/function `extract` in your console
=================================
Looking to extract a diverse range of file formats on your Mac or Linux? Look no further than the versatile `extract` command, designed to handle just about any file you throw at it! With built-in support for an extensive list of formats including .zip, .rar, .bz2, .gz, .zlib, .tar, .tbz2, .tgz, .Z, .7z, .xz, .exe, .tar.bz2, .tar.gz, .tar.xz, .arj, .cab, .chm, .deb, .dmg, .iso, .lzh, .msi, .rpm, .udf, .wim, .xar .cpio, .cbr, .cbz, .cb7, .cbt, .cba, .apk, .zpaq, .arc, .ciso, .zst, tar.zst and .vhd - you can rest assured that your extraction needs will be met with ease.`extract` utilizes free unpackers to ensure support for even the most obscure and outdated file types. Give `extract` a try and streamline your file extraction process today!
Description
-------------------------This is a Bash function called "extract" that is designed to extract a variety of file formats. It takes one or more arguments, each of which represents a file or path that needs to be extracted. If no arguments are provided, the function displays usage instructions.
The function uses a case statement to determine the appropriate extraction method for each file type, and then calls the corresponding command. For example, if the file is a ZIP archive, the function uses the "unzip" command to extract its contents.
If the file is not recognized as a valid archive, the function displays an error message and returns an error code of 1.
Before running the function, the value of the Internal Field Separator (IFS) is saved so that it can be restored at the end of the function. This is done to prevent unwanted word splitting and filename expansion when processing file paths.
Overall, this function provides a convenient way to extract a wide variety of archive formats using a single command, simplifying and streamlining the extraction process.
How to install (macOS)
-------------------------### macOS / OSX / Mac OS X
Add the highly convenient Copy & Paste functionality to your file management arsenal by simply including the appropriate code into your `~/.bash_profile` file. With this modification, you'll be able to breeze through your file manipulation tasks with ease and efficiency.or
add command into file `~/.bash_profile` or `~/.zshrc` or `~/.functions`
```bash
export PATH=/extract.sh:$PATH
``````bash
source /extract.sh
```So don't delay, update your `~/.bash_profile` today and supercharge your file management capabilities!
or
```bash
curl -L -o install_extract.sh https://raw.githubusercontent.com/xvoland/Extract/master/install_extract.sh && bash install_extract.sh && rm install_extract.sh
```
### Ubuntu / *nix
Copy&Paste function into file `~/.bashrc`
How to Use the Installer
-------------Copy the above code into a file, for example, install_extract.sh.
#### Download:
```bash
git clone https://github.com/xvoland/Extract.git
cd Extract
```#### Make the script executable:
```bash
chmod +x install_extract.sh
```#### Run the script:
```bash
./install_extract.sh
```
How it use
----------Using command `extract`, in a terminal
```bash
$ extract
``````bash
$ extract ...
```
### Donation
Regardless of whether funding is obtained or not, I will persist in refining the script's capabilities because it brings me joy to witness people using it and achieving their goals. However, I would be grateful for any support you could offer in offsetting the costs of hosting the domain and the time spent programming, which would otherwise encroach on my precious family time.
[Donate any amount for my projects][paypal]
---
![GitHub stats](https://github-readme-stats.vercel.app/api?username=xvoland&show_icons=true&theme=radical&hide_border=true)
## ⚠️ Sponsors
Extract community? Help us keep it alive by donating funds to cover project expenses!### Crypto
**BTC (ERC20):** 0x17496b75d241d377334717f8cbc16cc1a5b80396
**USDT (TRC20):** TAAsGXjNoQRJ7ewxSBL2W3DUCoG7h8LCT6### Other
[Become a sponsor][opencollective]
[][opencollective]
## ⛔ License
© 2013, [Vitalii Tereshchuk][home] via MIT license.## Other
### ☎️ Connect with me:
---
📺 Latest YouTube Videos
- [🔥 Lifehack Of Open a Sealed Tube. Did You Know?](https://www.youtube.com/watch?v=YlD9b6KnfdM)
- [💰 UAH 10 coins 2024 Ukraine’s New Medical Forces Coin. What is the price of the coin?](https://www.youtube.com/watch?v=qdtfhG7LqXg)
- [AI Avatar Demo](https://www.youtube.com/watch?v=EJhAssYHNNI)
- [ iPhone More Protection Against Theft iOS18 Stolen Device Protection](https://www.youtube.com/watch?v=I4pHVACAEYs)
- [NO LUT. Vintage Nikon D3100 DSLR as movie cam. Test Cinematic Look](https://www.youtube.com/watch?v=KQkXScIb0rk)➡️ [more videos...][youtube]
[home]: http://dotoca.net
[paypal]: https://paypal.me/xvoland
[youtube]: https://youtube.com/xvoland
[instagram]: https://www.instagram.com/xvoland/
[opencollective]: https://opencollective.com/extract/backers/0/website