I'm dumping an HTML document with lynx and wanted to parse some float values from the file but having a hard time figuring out how to do this in a shell script.
Code:
These weather Pages are provided by the Department of Electronics,
University of York
in partnership with our sponsor [1]Vaisala.
Temperature: 6.2 °C Highest: 33 °C (Mon 17th Jul 2006)
Lowest: -12.3 °C (Mon 6th Dec 2010)
Wind Chill: 3.6 °C Lowest: -17.8 °C (Thu 30th Jan 2003)
Pressure: 1028.0 mBars Highest: 1041 mBars (Sat 17th Feb 2001)
Lowest: 949 mBars (Mon 30th Oct 2000)
Wind Speed: 7.8 mph Highest: 47.3 mph (Mon 7th Feb 2011)
Wind Gust: 14.9 mph Highest: 69.1 mph (Tue 1st Sep 2009)
Wind Direction: 027 Degrees
Humidity: 85.4 %
Dew Point: 3.9 °C
Total Rainfall:
(Since Midnight) 0.00 mm Highest: 62.4 mm (Mon 25th Jun 2007)
Highest Intensity: 58.0 mm/h (Mon 7th Jun 2010)
Total Hail Fall:
(Since Midnight) 0.0 Hits/cm^2
Fetched at 10:42, Saturday 5th March 2011 (GMT) - (53°56'45.74"N,
1°3'13.74"W)
Maximum and minimum since 21/12/1998
References
1. http://www.vaisala.com/
I'd like to parse the Temperature: Wind Chill: Pressure: Wind Speed: Wind Gust: Wind Direction: Dew Point: Total Rainfall: Total Hail Fall: values so that I have a text output as follows (maintaining negative values where possible).
Code:
6.2 3.6 1028 7.8 14.9 27 85.4 3.9 0 0