Whenever ogr2ogr
is not able to read a file, it seems to produce pages of output:
Unable to open datasource `file.geojson' with the following drivers.
-> ESRI Shapefile
-> MapInfo File
-> UK .NTF
-> SDTS
-> TIGER
-> S57
-> DGN
-> VRT
-> REC
-> Memory
-> BNA
-> CSV
-> NAS
-> GML
-> GPX
-> LIBKML
...
Is there a way to suppress this incredibly annoying output? My workaround is:
ogr2ogr ... 2>&1 | grep -v '^ ->'