#!/bin/sh # Fri Jan 5 14:57:59 EST 2001 # FILE: /usr/local/bin/unpack # Copyright 2001, 2002, 2003, Chris F.A. Johnson # Released under the terms of the GNU General Public License die() { printf "%b\n" "$*" exit 5 } for file in "$@" do case $file in *.zip|*.ZIP) unzip -l "$file" >listing.txt ;; *.tgz|*tar.gz|*.tar.Z) gunzip -l "$file" >listing.txt ;; esac done