1 2 3 4 5 6 7
#! /bin/bash sed 's/[^,]*/"\0"/g' $1 |\ sed 's/.*/[\0]/g' |\ sed '1d' |\ jq '. | {"type": "Feature", "properties": {}, "geometry":{ "type": "Point", "coordinates": [(.[-1] | tonumber), (.[-2] | tonumber)] } }'|\ jq -s '{"type": "FeatureCollection", "features": .}'