Re: [dev] [sltar] Listed project idea to extend sltar with compression

From: Josuah Demangeon <mail_AT_josuah.net>
Date: Fri, 10 Feb 2017 21:05:12 +0100

On 2017-02-10 20:47, Hiltjo Posthuma wrote:
> On Fri, Feb 10, 2017 at 2:54 PM, yamada yohei <yamadayohei_AT_gmail.com>
> wrote:
>> Why we have to specify -z -j -a -Z or -J when decompress tar ball?
>> Why doesn't tar distinguish them automatically? (It should achieve
>> using file(1) or magic(5) database.) I cannot remember all these
>> options and always use pipeline e.g. bzcat | tar x. I don't sltar to
>> have these useless options.
>
> Nothing prevents you to write a shellscript wrapper [...]

It could be done with extensions:

        case "$1" in
        ( *.tar.gz ) tar -xzf "$1" ;;
        ( *.tgz ) tar -xzf "$1" ;;
        ( *.tar.bz2 ) tar -xjf "$1" ;;
        ( *.tbz2 ) tar -xjf "$1" ;;
        ( *.tar ) tar -xf "$1" ;;
        esac
Received on Fri Feb 10 2017 - 21:05:12 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 10 2017 - 21:12:13 CET