Skip to content

Instantly share code, notes, and snippets.

@atgmello
Last active March 10, 2020 11:45
Show Gist options
  • Save atgmello/03b7b59105a14048aeab617ac6aad513 to your computer and use it in GitHub Desktop.
Save atgmello/03b7b59105a14048aeab617ac6aad513 to your computer and use it in GitHub Desktop.
Unzipping automation for the DS4A LATAM 2020 course cases.
#!/bin/sh
cd ./$1
for z in *.zip; do
echo "Now unzipping ${z}"
unzip $z -n -d ../../cases/$1/
done
cd ../../cases/$1/
rm -rf __MAC*
@amancioandre
Copy link

Hi André,

Maybe you can improve this script by throwing a -n, which stands for never overwrite existing files:
unzip $z -n -d ../../cases/$1

People could loose stuff if they carelessly use your script to unzip new cases that are made available later than the original ones.
What do you think?

@atgmello
Copy link
Author

That's a great suggestion!
I've just updated the file with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment