Skip to content

Instantly share code, notes, and snippets.

@uprego
Created February 15, 2018 16:40
Show Gist options
  • Save uprego/a6bf1e93acc44b0309af215c28cf7ae1 to your computer and use it in GitHub Desktop.
Save uprego/a6bf1e93acc44b0309af215c28cf7ae1 to your computer and use it in GitHub Desktop.
compress and remove
#!/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}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment