I found this on the net.
Code: Select all
timezone=`wget -O - -q http://geoip.ubuntu.com/lookup | sed -n -e 's/.*<TimeZone>\(.*\)<\/TimeZone>.*/\1/p'`
How do you change the 's/.*<TimeZone>\(.*\)<\/TimeZone>.*/\1/p' so sed will replace value in <TimeZone>value</TimeZone> so value becomes $timezone?