Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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