unzip-nozipbomb

By Hal Canary, 2009-08-26 07:03:57 (link)
#computers-code

#!/bin/sh
## $HOME/bin/unzip-nozipbomb
## Written 2007 Hal Canary
## DTPD ##
for zipfile in "$@" ; do
    dir=$(basename "${zipfile}" .zip)
    if [ "${dir}" = "${zipfile}" ] ; then
	dir="${dir}.d"
    fi
    mkdir -p "${dir}"
    unzip -d "${dir}" "${zipfile}"
done

(back)