You are not logged in.

#1 2006-09-16 08:20:43

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

decompressor script for using tar, unrar, unzip, unace...

...with a single cml interface.
Do something like that exists?
If not, would you be interested if I'd work on it?

Offline

#2 2006-09-16 08:43:09

oseb
Member
From: Busan, Korea
Registered: 2005-05-26
Posts: 31

Re: decompressor script for using tar, unrar, unzip, unace...

maybe xarchiver is able with only one command line.

Offline

#3 2006-09-16 10:22:15

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: decompressor script for using tar, unrar, unzip, unace...

courtesy of rezza from .bashrc:

extract () {
   if [ -f $1 ] ; then
      case $1 in
         *.tar.bz2)   tar xjf $1      ;;
         *.tar.gz)   tar xzf $1      ;;
         *.bz2)      bunzip2 $1      ;;
         *.rar)      rar x $1      ;;
         *.gz)      gunzip $1      ;;
         *.tar)      tar xf $1      ;;
         *.tbz2)      tar xjf $1      ;;
         *.tgz)      tar xzf $1      ;;
         *.zip)      unzip $1      ;;
         *.Z)      uncompress $1   ;;
         *)         echo "'$1' cannot be extracted via extract()" ;;
      esac
   else
      echo "'$1' is not a valid file"
   fi
} 

Offline

#4 2006-09-16 13:12:08

hotsauce
Member
From: Ann Arbor
Registered: 2005-12-28
Posts: 125

Re: decompressor script for using tar, unrar, unzip, unace...

Thanks for that! simple and effective...

Offline

#5 2006-09-16 19:54:56

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: decompressor script for using tar, unrar, unzip, unace...

Yes, something like that. But also compressing...

Offline

#6 2006-09-17 01:01:10

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: decompressor script for using tar, unrar, unzip, unace...

http://www.nongnu.org/atool/ ... it's on AUR.


1000

Offline

#7 2006-09-17 11:50:37

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: decompressor script for using tar, unrar, unzip, unace...

byte wrote:

and it's great!

Offline

#8 2006-09-17 15:25:39

trapdoor
Member
Registered: 2005-03-27
Posts: 82
Website

Re: decompressor script for using tar, unrar, unzip, unace...

extract () {
   if [ -f $1 ] ; then
      case $1 in
         *.tar.bz2)   tar xjf $1      ;;
         *.tar.gz)   tar xzf $1      ;;
         *.bz2)      bunzip2 $1      ;;
         *.rar)      rar x $1      ;;
         *.gz)      gunzip $1      ;;
         *.tar)      tar xf $1      ;;
         *.tbz2)      tar xjf $1      ;;
         *.tgz)      tar xzf $1      ;;
         *.zip)      unzip $1      ;;
         *.Z)      uncompress $1   ;;
         *)         echo "'$1' cannot be extracted via extract()" ;;
      esac
   else
      echo "'$1' is not a valid file"
   fi
} 

Really some nice work!

Offline

#9 2006-09-17 19:59:13

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: decompressor script for using tar, unrar, unzip, unace...

There's also "e" if you're into Ruby: http://martin.ankerl.org/2006/08/11/pro … y-archive/

Offline

Board footer

Powered by FluxBB