shithub: riscv

Download patch

ref: ee4ddd77f70132904f3c9cedb38540b336c68f70
parent: cae41c18ff33f0dc1179fda611fb46c21b5fc6e3
author: stanley lieber <stanley.lieber@gmail.com>
date: Mon Jan 6 09:55:42 EST 2014

weather: trim garbage from output

--- a/rc/bin/weather
+++ b/rc/bin/weather
@@ -42,5 +42,5 @@
 grep -v 'CITY FORECAST MENU' |
 tr -d '
' |
 sed 's/ *$//' |
-uniq
-
+uniq |
+sed -n '/^VTEC/q; p'
--- a/sys/man/1/weather
+++ b/sys/man/1/weather
@@ -28,8 +28,13 @@
 The arguments are mutually exclusive and case-insensitive.
 If neither is given,
 .I air
-defaults to location identifier
+defaults to the value of the environment variable
+.BR $weather ,
+or if it is unset,
+to the location identifier
 .BR ewr ,
 designating the Newark, NJ, airport near Bell Labs, Murray Hill.
 .SH SOURCE
 .B /rc/bin/weather
+.SH BUGS
+Weather is hopelessly provincial.
--