Skip to content

Instantly share code, notes, and snippets.

@yebt
Created February 7, 2023 15:21
Show Gist options
  • Save yebt/f589a8ba4d56658431aaf7c09e1b18f0 to your computer and use it in GitHub Desktop.
Save yebt/f589a8ba4d56658431aaf7c09e1b18f0 to your computer and use it in GitHub Desktop.
#!/bin/bash
unz (){
[ -z "$1" ] && echo "no file to unzip :|" && exit 1
name="${1%.*}"
echo "----------------------"
echo "uncompress ----------- $1"
echo "----------------------"
unzip $1 -d $name
}
files=$(ls *.zip 2> /dev/null)
for f in $files ; do
unz $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment