Created
January 5, 2015 01:46
-
-
Save matthewberryman/6409b31bc258d5195d30 to your computer and use it in GitHub Desktop.
For crawling directories and zipping up all of the associated shape files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read shp | |
do | |
echo Processing $shp | |
base=`echo $shp | sed "s/\.shp$//"` | |
zip=${base}.zip | |
rm -f $zip | |
zip "$zip" "${base}.shp" "${base}.shx" "${base}.prj" "${base}.dbf" | |
done < <(find . -name \*.shp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment