#!/bin/bash
if[x$1=x]
then
echo"用法:./geocoding.shfilename"
exit-1
fi
whilereadfileline
do
RESULT=`curl"http://maps.googleapis.com/maps/api/geocode/xml?address="$fileline"&sensor=false&language=zh-CN"2>/dev/null`
LAT=`echo$RESULT|awk-F"location>"'{print$2}'|awk-F">"'{print