Show HN: Bar a simple archive tool in bash

89
Show HN: Bar a simple archive tool in bash

A simple archive tool in pure bash using baee64 and stat

HELP

Usage: bar.sh [azRXlvnxh]

Options:
    -a      Append
    -X      Extract
    -l      list
    -v      View       
    -n      No dot files
    -R      Don't restore rights
    -z      Compress
    -s      Dry-run
    -x      Xtrace

Example:
    Create a bar file
        bar.sh NAME.bar file1 dir1/

    View file in bar
        bar.sh -v NAME.bar file

    List files in bar
        bar.sh -l NAME.bar

    Extract:
        Extract files in a different folder:
            bar.sh -X NAME.bar folder

        Extract files in current folder:
            bar.sh -X NAME.bar 

        Extract custom files in a different folder:
            bar.sh -X NAME.bar folder FILE1 FILE2

Environment Variable:
    BAR_COMPRESS    default : gzip
    BAR_UNCOMPRESS  default : gunzip
    BAR_CAT         default : _cat

NOTE:
    Currently no compression is scripted
    Currently you can't extract single files in current directory
  • Implement https:////github.com/hyperupcall/bash-algo/blob/main/pkg/lib/public/bash-algo.sh

Well it’s fun 😀

Read More

Knowasiak
WRITTEN BY

Knowasiak

Hey! look, i give tutorials to all my users and i help them!

you're currently offline