Hi, I would like to format the file input example to the specific output example. I have tried numerous different ways, however not able to extract the information as desired. Any assistance to get the file formatted would be truly appreciated:
Input:
server:<server url="http://speedtestwlfdle.rogers.com/speedtest/upload.php" lat="43.6000" lon="-79.6500" name="Mississauga, ON" country="Canada" cc="CA" sponsor="Rogers" id="8783" url2="http://speedtestwlfdle.rogers.com/speedtest2/upload.php" host="speedtestwlfdle.rogers.com:8080" />
server:<server url="http://sp1.mornington.ca/speedtest/upload.php" lat="43.5658" lon="-80.9222" name="Milverton, ON" country="Canada" cc="CA" sponsor="Mornington Communications Ltd" id="10727" url2="http://sp2.mornington.ca/speedtest/upload.php" host="sp1.mornington.ca:8080" />
server:<server url="http://speedy-1.tcc.on.ca/speedtest/upload.php" lat="43.5625" lon="-81.6980" name="Bayfield, ON" country="Canada" cc="CA" sponsor="Tuckersmith Communications" id="3533" url2="http://speedy-2.tcc.on.ca/speedtest/upload.php" host="speedy-1.tcc.on.ca:8080" />
Output:
http://speedtestwlfdle.rogers.com/speedtest/upload.php;43.6000;-79.6500;Mississauga, ON;Canada;CA;Rogers,8783;http://speedtestwlfdle.rogers.com/speedtest2/upload.php;speedtestwlfdle.rogers.com:8080
http://sp1.mornington.ca/speedtest/upload.php;43.5658;-80.9222;Milverton, ON;Canada;CA,Mornington Communications Ltd;10727;http://sp2.mornington.ca/speedtest/upload.php;sp1.mornington.ca:8080
http://speedy-1.tcc.on.ca/speedtest/upload.php;43.5625;-81.6980;Bayfield, ON;Canada;CA;Tuckersmith Communications;3533;http://speedy-2.tcc.on.ca/speedtest/upload.php;speedy-1.tcc.on.ca:8080
Attempts to format:
awk 'BEGIN{FS="=";OFS=","}{print}' | sed 's/[{}"]//g'