You don't identify yourself
This simple function will save you a few keystrokes each time, when you need to unpack some tar archive.
Here we are! It's easy and should work in bash and zsh.
function untar()
{
[ `basename $1 .gz` != $1 ] && tar -zxvf $1 && return 0
[ `basename $1 .bz2` != $1 ] && tar -jxvf $1 && return 0
}
Comments
Subscribe on this post's comments
permalink
you forgot about archive.tgz
permalink
maybe something like
permalink
It is better to add another line to this function instead of this complex logic.
If you wish to leave comment, please, identify yourself and then come back to this page.