home
/
code
/
khatus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Report GCed src and key more-clearly
[khatus.git]
/
bin
/
khatus_parse_metar_d_output
diff --git
a/bin/khatus_parse_metar_d_output
b/bin/khatus_parse_metar_d_output
index
49f1067
..
1dd2778
100755
(executable)
--- a/
bin/khatus_parse_metar_d_output
+++ b/
bin/khatus_parse_metar_d_output
@@
-3,10
+3,9
@@
# Qualifying the name as "_d_output" lest it be mistaken for parser of actual
# metar format.
# Qualifying the name as "_d_output" lest it be mistaken for parser of actual
# metar format.
-function strip(s) {
- sub("^ *", "", s)
- sub(" *$", "", s)
- return s
+BEGIN {
+ OFS = msg_fs ? msg_fs : "|"
+ Kfs = key_fs ? key_fs : ":"
}
/METAR pattern not found in NOAA data/ {
}
/METAR pattern not found in NOAA data/ {
@@
-36,9
+35,19
@@
END {
split(temp_string, temp_parts, " +")
temp_celsius = temp_parts[1]
temp_fahrenheit = (temp_celsius * (9 / 5)) + 32
split(temp_string, temp_parts, " +")
temp_celsius = temp_parts[1]
temp_fahrenheit = (temp_celsius * (9 / 5)) + 32
- print "temperature " temp_fahrenheit "°F"
+ print("temperature_c", temp_celsius) # °C
+ print("temperature_f", temp_fahrenheit) # °F
for (i=first["Phenomena"]; i<=last["Phenomena"]; i++) {
for (i=first["Phenomena"]; i<=last["Phenomena"]; i++) {
- print "phenomena " values[i]
+ phenomenon = values[i]
+ if (phenomenon) {
+ print("phenomenon" Kfs i, phenomenon)
+ }
}
}
}
}
}
}
+
+function strip(s) {
+ sub("^ *", "", s)
+ sub(" *$", "", s)
+ return s
+}
This page took
0.038605 seconds
and
4
git commands to generate.