Return-Path: <jmorzins@MIT.EDU>
Received: from central-city-carrier-station.mit.edu by po11.mit.edu (8.9.2/4.7) id OAA21833; Tue, 9 Apr 2002 14:22:15 -0400 (EDT)
Received: from melbourne-city-street.mit.edu (MELBOURNE-CITY-STREET.MIT.EDU [18.7.21.86])
	by central-city-carrier-station.mit.edu (8.9.2/8.9.2) with ESMTP id OAA04769;
	Tue, 9 Apr 2002 14:20:11 -0400 (EDT)
Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73])
	by melbourne-city-street.mit.edu (8.9.2/8.9.2) with ESMTP id OAA05772;
	Tue, 9 Apr 2002 14:15:40 -0400 (EDT)
Received: from localhost (jmorzins@localhost) by multics.mit.edu (8.9.3) with ESMTP
	id OAA07770; Tue, 9 Apr 2002 14:15:39 -0400 (EDT)
Date: Tue, 9 Apr 2002 14:15:39 -0400 (EDT)
From: Jacob Morzinski <jmorzins@MIT.EDU>
Reply-To: <sipb@MIT.EDU>
To: Matthew Guyton <mcguyton@mit.edu>
cc: <sipb@mit.edu>
Subject: Re: linux command help
In-Reply-To: <Pine.GSO.4.30L.0204091318080.10814-100000@department-of-alchemy.mit.edu>
Message-ID: <Pine.GSO.4.30L.0204091409450.1099-100000@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 9 Apr 2002, Matthew Guyton wrote:
> For instance, now, there is no "Today" but there is a "This afternoon" and
> a "Tonight".

Two versions of the same perl one-liner follow, but the complexity
is increasing to the point where a stand-alone script will be more
useful.


athrun weather weather -f bos -h -z | perl -e '$/="\n   "; while(<>) { if (/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat)/) {print "\n"; exit} print }'
athrun weather weather -f bos -h -z | perl -0012004000400040 -ne 'if (/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat)/) {print "\n"; exit} print'


 -Jacob Morzinski


(Mmmmmm.  Abuse of command-line options...)

