The ogr2ogr utility is a general purpose tool and all that it can do is documented in https://gdal.org/programs/ogrinfo.html. There are some options for limiting the amount of output (-nocount
-noextent
nogeomtype
) but their main purpose is to make ogrinfo faster because with some formats getting such information may require reading every single feature from the source data.
Information that fits on one line and has a unique keyword can be filtered from the output with sed of find
ogrinfo -so -al test.shp|find "Extent"
Extent: (7156409.373471, 207.123904) - (7156409.373471, 207.123904)
Python scripting is probably the best option for getting just the desired information. There is a Python version of ogrinfo in the section of Python demos in GitHub https://github.com/OSGeo/gdal/blob/master/swig/python/gdal-utils/osgeo_utils/samples/ogrinfo.py. It might be a good starting point for an own custom script.