3 # Qualifying the name as "_d_output" lest it be mistaken for parser of actual
12 /METAR pattern not found in NOAA data
/ {
27 values
[NR] = strip
($
0)
33 print "metar fetch failed" > "/dev/stderr"
35 temp_string = values
[first
["Temperature"]]
36 split(temp_string
, temp_parts
, " +")
37 temp_celsius = temp_parts
[1]
38 temp_fahrenheit =
(temp_celsius
* (9 / 5)) + 32
39 print "temperature " temp_fahrenheit
"°F"
40 for (i=first
["Phenomena"]; i
<=last
["Phenomena"]; i
++) {
41 phenomenon = values
[i
]
43 print "phenomenon " phenomenon