Skip to content

Instantly share code, notes, and snippets.

@necoyama3
Last active June 22, 2017 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save necoyama3/3bb7646772f2a442a82f to your computer and use it in GitHub Desktop.
Save necoyama3/3bb7646772f2a442a82f to your computer and use it in GitHub Desktop.
easy encrypt zip function for .zshrc
function ze() {
if [ $# = 0 ]; then
echo "usage: ze [./file] [./dirctory]"
else
arg=$1
if [ `echo $arg | grep '\.'` ]; then
file_name=`echo $arg | cut -d'.' -f1`
zip -e "$file_name.zip" $arg
else
zip -e -r "$arg.zip" $arg
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment