Uy que lio de saltos de línea, mejor lo mando en HTML<div><br></div><div>********************************************************************</div><div><div>#!/bin/bash</div><div><br></div><div>fidlist=`ogrinfo -ro -al -geom=SUMMARY Poligonos_Peninsula_IB_CE_ML_ED50_LL.shp|grep -E ":[0-9]+$"|grep -o -E "[0-9]+$"`</div>
<div><br></div><div>echo '<OGRVRTDataSource></div><div> <OGRVRTLayer name="salida"></div><div> <SrcDataSource>salida.csv</SrcDataSource></div><div> <GeometryType>wkbMultiPolygon</GeometryType></div>
<div> <LayerSRS>WGS84</LayerSRS></div><div> <GeometryField encoding="WKT" field="GEOM"/></div><div> </OGRVRTLayer></div><div></OGRVRTDataSource>' > salida.vrt</div>
<div><br></div><div>for i in $fidlist</div><div>do</div><div>geom=`ogrinfo -fid $i -q Poligonos_Peninsula_IB_CE_ML_ED50_LL.shp Poligonos_Peninsula_IB_CE_ML_ED50_LL|grep MULTIPOLYGON`</div><div>echo "ID,GEOM" > salida.csv</div>
<div>echo $i,'"'$geom'"' >> salida.csv</div><div>extent=`ogrinfo -ro -so -al -geom=SUMMARY -fid $i salida.vrt|grep Extent|awk '{print $2 $3 $5 $ 6}'`</div><div>echo $i $extent >> extents.txt</div>
<div>done</div></div><div>********************************************************************<br>-- <br>Pedro-Juan Ferrer Matoses<br>Valencia (España)<br><br><br></div>