• Stars
    star
    464
  • Rank 94,450 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bash/Zsh function for extract: .zip, .rar, .bz2, .gz, .zlib, .tar, .tbz2, .tgz, .Z, .7z, .xz, .exe, .tar.bz2, .tar.gz, .tar.xz, etc.

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 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

export PATH=<path_to_file>/extract.sh:$PATH

So don't delay, update your ~/.bash_profile today and supercharge your file management capabilities!


Ubuntu / *nix

Copy&Paste function into file ~/.bashrc

I use hosting

My hosting here

How it use

Using command extract, in a terminal

$ extract <archive_filename.extention>
$ extract <archive_filename_1.extention> <archive_filename_2.extention> <archive_filename_3.extention> ...

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

Click here to lend your support to Extractor and make a donation!


GitHub stats


Sponsors

Extract community? Help us keep it alive by donating funds to cover project expenses!

Become a sponsor


License

© 2013, Vitalii Tereshchuk via MIT license.

Other

Connect with me:

xVoLAnD xvoland | Instagram Vitalii Tereshchuk | YouTube




📺 Latest YouTube Videos

➡️ more videos...

More Repositories

1

My-Arduino-Config-Files

My Arduino IDE configuration with bootloaders
C
8
star
2

jquery-plugin-svg-style

SVG Style - jQuery plugin to manipulate with styles of SVG in runtime http://xvoland.github.io/jquery-plugin-svg-style/
JavaScript
6
star
3

html-meta-tags

COMPLETE LIST OF HTML META TAGS
6
star
4

SSDOpt

RAM drive for optimizations of macOS on SSD
Python
5
star
5

html-validate

Custom Assert HTMLValidate for PHPUnit - HTML5/xHTML/HTML/SVG validation in your unittests
PHP
5
star
6

useful-bash

Some useful functions for bash witch can be use in Bash
Shell
3
star
7

shuffle-files

This is a CLI tool which shuffles the files in the directory, their content, but without changing the file names
Go
3
star
8

jquery-plugin-autohideinput

Auto Hide Input (jQuery Plugin)
JavaScript
2
star
9

brew-regenerate-packages

Mac OSX C++ standard library: libstdc++ (from clang). Upgrade brew packages from 10.8 to 10.9 Mavericks
Ruby
2
star
10

Rainbow-Bash-function

Bash Rainbow function
Shell
1
star
11

ai-online-tools

Services and online tools using the new chatGPT technology from OpenAI
1
star
12

Stable-Diffusion

my various useful researches for Stable Diffusion
1
star
13

HH5-openwrt-BT-WAN-config

HH5a Openwrt BT Home Hub 5.0 Type A configuration for connection of ethernet WAN and SSL
1
star
14

macOS.my-bash-functions

macOS My Bash Function
Shell
1
star
15

gulp-xv-webp-html

GULP extension for support tag <picture> WEBP images and replaced original image tag in HTML in other words: replace <img> to <picture> for supports webp
JavaScript
1
star
16

gulp-xv-HTML-Template

This Gulp-template script automatically optimise SVG-sprites, converts fonts from TTF/OTF to WOFF/WOFF2, converts from SCSS/SASS to CSS-style, optimize CSS-styles, merges and minifies CSS-styles, merges and minifies JavaScripts. And also, gives the ability to edit in a live browser.
JavaScript
1
star