Skip to content

Instantly share code, notes, and snippets.

@aaronlidman
Created September 14, 2012 02:36
Show Gist options
  • Save aaronlidman/3719477 to your computer and use it in GitHub Desktop.
Save aaronlidman/3719477 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir merged;
for f in *.shp;
do
if [ -f merged/merged.shp ]
then
ogr2ogr -f "ESRI Shapefile" -update -append -skipfailures merged/merged.shp "$f" -nln Merged
else
ogr2ogr -f "ESRI Shapefile" merged/merged.shp "$f"
fi;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment