Skip to content

Instantly share code, notes, and snippets.

@uprego
Created February 15, 2018 16:40

Revisions

  1. uprego created this gist Feb 15, 2018.
    10 changes: 10 additions & 0 deletions compress_and_remove.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/sh


    if test $# -ne 1
    then
    echo 'must receive exactly one argument'
    exit 1
    fi

    tar czvf "${1}.tar.gz" "${1}" && rm -fv "${1}"