My intention is to go through list of addresses and call google geocode api for each of them. I am using lynx for this, but somehow I can't supply the parameters to it in a proper way.
To show that my parameters are OK I just hardcoded one address in my script and put it in my input file, and the hardcoded call runs just fine:
#!/bin/ksh
rqst1='http://maps.googleapis.com/maps/api/geocode/xml?&address='
rqst2=' CA, USA&sensor=false'
INPF=${1:-addr_list}
while read addr; do
set -x
lynx -dump "'""$rqst1""$addr""$rqst2""'"
lynx -dump 'http://maps.googleapis.com/maps/api/geocode/xml?&address=10925 RAILROAD ST&sensor=false'
done < $INPF
$ cat addr_list
10925 RAILROAD ST
I set -x to show how my parameters look and I don't see any fault on my side, yet lynx is not happy, here is the results:
+ lynx -dump 'http://maps.googleapis.com/maps/api/geocode/xml?&address=10925 RAILROAD ST CA, USA&sensor=false'
Alert!: Unsupported URL scheme!
lynx: Start file could not be found or is not text/html or text/plain
Exiting...
+ lynx -dump http://maps.googleapis.com/maps/api/geocode/xml?&address=10925 RAILROAD ST&sensor=false
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
<status>OK</status>
<result>
... etc...
Please point me into right direction here.