Created
May 22, 2015 11:50
-
-
Save keiya/7ca04db707b938542157 to your computer and use it in GitHub Desktop.
Progressive extractor of compressed files (arc, zip, lzh, 7z, rar); requires unar (The UNARchiver); tested on Windows 8.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| UNAR='/cygdrive/d/apps/unar/unar.exe' | |
| find "$1" -type f \( -iname "*.lzh" -o -iname "*.arc" -o -iname "*.zip" -o -iname "*.7z" -o -iname "*.rar" \) -print0 | while IFS= read -r -d '' fullfile; do | |
| fullpath=$(readlink -f "${fullfile}") | |
| fulldir=$(dirname "${fullfile}") | |
| $UNAR -t -o "${fulldir}" "${fullfile}" && rm -f "${fullfile}" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment