Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
file="./final/merge.shp"
for i in $(ls *.shp)
do
if [ -f "$file" ]
then
echo "creating final/merge.shp"
ogr2ogr -f 'bathymetry shapefile' -update -append $file $i -nln merge
else
echo "merging……"
ogr2ogr -f "bathymetry shapefile" $file $i
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment