Re: Virtual Call of the Wind...

From: Michael Schuh (schuh@apm-iris4.arc.nasa.gov-DeleteThis)
Date: Tue Mar 28 2000 - 13:36:11 PST


Received: from opus.hpl.hp.com (root@opus.hpl.hp.com-DeleteThis [15.0.168.176]) by jr.hpl.hp.com (8.8.6/8.8.6) with ESMTP id NAA23986 for <wind_talk_ls@jr.hpl.hp.com-DeleteThis>; Tue, 28 Mar 2000 13:39:59 -0800 (PST)
Received: from hplms26.hpl.hp.com (hplms26.hpl.hp.com [15.255.168.31]) by opus.hpl.hp.com (8.8.6/8.8.6) with ESMTP id NAA06408 for <wind_talk@opus.hpl.hp.com-DeleteThis>; Tue, 28 Mar 2000 13:40:00 -0800 (PST)
Received: from apm-iris4.arc.nasa.gov (apm-iris4.arc.nasa.gov [128.102.162.184]) by hplms26.hpl.hp.com (8.9.3 (PHNE_18979)/HPL-PA Relay) with ESMTP id NAA24294 for <wind_talk@opus.hpl.hp.com-DeleteThis>; Tue, 28 Mar 2000 13:39:58 -0800 (PST)
Received: (from schuh@localhost) by apm-iris4.arc.nasa.gov (980427.SGI.8.8.8/980728.SGI.AUTOCF) id NAA99554 for wind_talk@opus.hpl.hp.com-DeleteThis; Tue, 28 Mar 2000 13:36:11 -0800 (PST)
Date: Tue, 28 Mar 2000 13:36:11 -0800 (PST)
From: schuh@apm-iris4.arc.nasa.gov-DeleteThis (Michael Schuh)
Message-Id: <200003282136.NAA99554@apm-iris4.arc.nasa.gov-DeleteThis>
To: wind_talk@opus.hpl.hp.com-DeleteThis
Subject: Re: Virtual Call of the Wind...


> On a Unix system, you can use .forward to preprocess incoming mail.

This is what I do with my best.com account (I don't use my government
box for this). I use the .forward to call procmail and then procmail
calls a script that filters out most of the information and sends
it to my pager. I only want a few lines of the data since my pager
cannot hold much information. I decided that I wanted a message
each hour between 11:00 AM and 11:00 PM. This lets me know when the wind
is building and I can look at old pages for the history. This worked
well last season.

Here are the details:

My .forward file has
] "|IFS=' '&&exec /usr/local/bin/procmail -f-||exit 75 #user_name"

where "user_name" is my account username.

My .procmailrc file has

] #
] # messages sent to michael@boardsailor.com-DeleteThis and from wind_24@opus.hpl.hp.com-DeleteThis are processed
] # by a script and the results sent to the pager.
]
] :0
] * ^To: Multiple recipients of list <wind_24@opus.hpl.hp.com-DeleteThis>
] | bin/wind_report_pager.csh
]
] #

My bin/wind_report_pager.csh script has:

] #!/bin/csh
] #
] # This script is called by procmail. Procmail sends the wind report
] # to it. The script finds the SFO|SoSF_SBrMt|Sac|Stoc reports and
] # emails them to my pager. Only send the reports between 11:00 and 20:00.
] #
] # Michael Schuh
] # July 27, 1999
] #
]
] # exit because we are out of season.
] cat > /dev/null
] exit(0)
]
] sed -n '/Current Conditions/,/Forecasts/p' | \
] egrep 'SFO|SoSF_SBrMt|Sac|Stoc' | \
] sed '/SFO.*0.00 /d' | \
] uniq > ~/windrpt
]
]
] set hour=`date +%H`
] if ( $hour > 11 ) then
] set Time=`date "+%I:%M PM"`
] else
] set Time=`date "+%I:%M AM"`
] endif
]
] #The following line is for debugging. It sends my email account the message.
] #mail -s "Pager $Time Wind Report" mschuh@mail.arc.nasa.gov-DeleteThis < ~/windrpt
]
] if ( $hour > 10 && $hour < 21 ) then
] mail -s "$Time Report" 6503710040.1142141@pagenet.net-DeleteThis < ~/windrpt
] endif

Michael



This archive was generated by hypermail 2b29 : Fri Sep 27 2002 - 12:23:59 PDT