Re: Descomprimir archivos .zip
Hola:
> Reply-To:
> Hola, Lista.... ¿cómo se descomprimen los archivos .zip?... Estoy mareando al gunzip pero nada. Gracias
No se si es la solucion a tu problema, pero en
http://www.linuxfocus.org/Castellano/September2001/article216.sht
ml (en concreto:
http://www.linuxfocus.org/common/src/article216/smartzip.txt) hay
un programa (smartzip) que a mi mi va muy bien.
Saludos. Pep.
--Inicio smartzip-------------------------------------------------------------------------
#!/bin/sh
# vim: set sw=4 ts=4 et:
help()
{
cat <<HELP
smartzip -- automatically find the compression type of a file
and then uncompress it
USAGE: smartzip file
smartzip knows about:
bzip2
gzip
zip
HELP
exit 0
}
error()
{
# print an error and exit
echo "$1"
exit 1
}
# print help if no args given:
[ -z "$1" ] && help
[ -r "$1" ] || error "error: can not read file $1"
#
inputfile="$1"
ftype=`file "$inputfile"`
case "$ftype" in
"$inputfile: Zip archive"*)
unzip "$inputfile" ;;
"$inputfile: gzip compressed"*)
gunzip "$inputfile" ;;
"$inputfile: bzip2 compressed"*)
bunzip2 "$inputfile" ;;
*) error "File $inputfile can not be uncompressed with smartzip";;
esac
#
---Final smartzip-------------------------------------------------------------------------
----------------
Josep Roca
Epidemiologia
Hospital U Germans Trias i Pujol
Ctra Canyet s/n
08916 Badalona, Barcelona
Spain
Tel: +34 93-497-88-82
FAX: +34 93-497-88-43
jroca@ns.hugtip.scs.es
http://blues.uab.es/~ikhp0/
Reply to: