A script to batch merge multiple shapefiles into one using ogr2ogr / GDAL on Mac
Original wiki page (you should use the version there) — copied here with a more descriptive title with the hope that it becomes easier to find.
#Make a new directory called "tmp" and a sub directory called "merged"
mkdir tmp
mkdir tmp/merged
#copy all zipped files to the "tmp" directory and then "cd" into it
cp *.zip tmp
cd tmp
#unzip all the .zip archives
find . -name "*.zip" -exec unzip '{}' \;
#delete all .zip archives
rm *.zip
# move a single shapefile (and the cooresponded .shx, .dbf, etc files) to the
# "merged" directory (exchange 'myshape*' for the name of one of your shapefiles
# keeping the '*' at the end of the name)
find . -name 'myshape*' -exec mv '{}' merged \;
#Batch merge all the remaining shapefiles from the tmp dir into the copied
# file in the merge dir (exchange 'myshape' for the name of the copied shapefile)
for i in $(ls *.shp); do ogr2ogr -f 'ESRI Shapefile' -update -append merged $i -nln myshape
done