All pastes #1741936 Raw Edit

clueless

public text v1 · immutable
#1741936 ·published 2010-01-07 22:16 UTC
rendered paste body
tarview () {     echo -n "Displaying contents of $1 ";    if [ ${1##*.} = tar ]; then        echo "(uncompressed tar)";        tar tvf $1;    else        if [ ${1##*.} = gz ]; then            echo "(gzip-compressed tar)";            tar tzvf $1;        else            if [ ${1##*.} = bz2 ]; then                echo "(bzip2-compressed tar)";                cat $1 | bzip2 -d | tar tvf -;            fi;        fi;    fi}