[sf-lug] (forw) SF-LUG pages

jim jim at systemateka.com
Thu Jan 19 16:30:57 PST 2012



    You're wonderful, Ken. Thanks lots. I love 
the script. 
    I guess I'll have to move the sf-lug.org web 
site to a new host and repoint the domain name. 
The current host system is not under my control. 




On Thu, 2012-01-19 at 16:21 -0800, Ken Shaffer wrote:
> Hi Jim, 
> Here's a little script to generate the meetings for a year in your
> existing format:
> $ cat sflug-meetings.sh
> #!/bin/bash
> # SF Linux User Group Meetings on the first Sunday
> # and third Monday of the month.
> # Optional parameter is the four digit year
> #
> # Constants for date's day of week
> MONDAY=1
> SUNDAY=7
> # Initialize counters for days and months, and day counters
> MON=1
> DAY=1
> # Targets for meetings, first Sunday and third Monday of a month
> # Algorithm only valid up to the third occurrence of any day
> FIRSTSUN=1
> THIRDMON=3
> NTHSUN=$FIRSTSUN
> NTHMON=$THIRDMON
> # Current year will be used if no input parameter
> CURRENTYR=`date "+%Y"`
> YEAR=${1:-$CURRENTYR} 
> 
> # loop though all months, and sufficient days to get to third Monday
> while [ "$MON" -le 12 ] ; do
>   # Use 28 to allow up the the fourth occurrence of any day
>   while [ $DAY -le 21 ] ; do
>     TST=`date '+%u' -d "$MON/$DAY/$YEAR"`
>     if [ $NTHSUN -ge 1 -a $TST -eq $SUNDAY ]; then
>       NTHSUN=`expr $NTHSUN - 1 `
>       echo "`date -d $MON/$DAY/$YEAR "+%A, %B %e, %Y,"` from 11:00AM
> till 1:00PM"
>     fi
>     if [ $NTHMON -ge 1 -a $TST -eq $MONDAY ]; then
>       NTHMON=`expr $NTHMON - 1 `
>       if [ $NTHMON -eq 0 ]; then
>         echo "`date -d $MON/$DAY/$YEAR "+%A, %B %e, %Y,"` from 6:00PM
> till 8:00PM"
>       fi
>     fi
>     DAY=`expr $DAY + 1 `
>   done
>   DAY=1
>   MON=`expr $MON + 1 `
>   NTHSUN=$FIRSTSUN
>   NTHMON=$THIRDMON
> done
> 
> $ ./sflug-meetings.sh
> Sunday, January  1, 2012, from 11:00AM till 1:00PM
> Monday, January 16, 2012, from 6:00PM till 8:00PM
> Sunday, February  5, 2012, from 11:00AM till 1:00PM
> Monday, February 20, 2012, from 6:00PM till 8:00PM
> Sunday, March  4, 2012, from 11:00AM till 1:00PM
> Monday, March 19, 2012, from 6:00PM till 8:00PM
> Sunday, April  1, 2012, from 11:00AM till 1:00PM
> Monday, April 16, 2012, from 6:00PM till 8:00PM
> Sunday, May  6, 2012, from 11:00AM till 1:00PM
> Monday, May 21, 2012, from 6:00PM till 8:00PM
> Sunday, June  3, 2012, from 11:00AM till 1:00PM
> Monday, June 18, 2012, from 6:00PM till 8:00PM
> Sunday, July  1, 2012, from 11:00AM till 1:00PM
> Monday, July 16, 2012, from 6:00PM till 8:00PM
> Sunday, August  5, 2012, from 11:00AM till 1:00PM
> Monday, August 20, 2012, from 6:00PM till 8:00PM
> Sunday, September  2, 2012, from 11:00AM till 1:00PM
> Monday, September 17, 2012, from 6:00PM till 8:00PM
> Sunday, October  7, 2012, from 11:00AM till 1:00PM
> Monday, October 15, 2012, from 6:00PM till 8:00PM
> Sunday, November  4, 2012, from 11:00AM till 1:00PM
> Monday, November 19, 2012, from 6:00PM till 8:00PM
> Sunday, December  2, 2012, from 11:00AM till 1:00PM
> Monday, December 17, 2012, from 6:00PM till 8:00PM
> 
> Ken
> 
> On Thu, Jan 19, 2012 at 7:20 AM, jim <jim at systemateka.com> wrote:
>         
>         
>         Thank you, Rick.
>         
>         
>         
>         On Wed, 2012-01-18 at 22:32 -0800, Rick Moen wrote:
>         > Forwarding to a wider audience, as y'all still ought to fix
>         it.
>         >
>         > ----- Forwarded message from Rick Moen <rick at linuxmafia.com>
>         -----
>         >
>         > Date: Tue, 5 Jul 2011 01:12:27 -0700
>         > From: Rick Moen <rick at linuxmafia.com>
>         > To: Jim Stockford <jim at well.com>
>         > Subject: SF-LUG pages
>         > Organization: If you lived here, you'd be $HOME already.
>         >
>         > Hi, Jim.  I notice that http://www.sf-lug.org/ no longer
>         serves up the
>         > site 'index.html' page, but rather an HTTPd-generated index
>         page.
>         > I am unclear on precisely what changed, but suspect you
>         should figure
>         > that out and fix it.  Otherwise, people are not going to
>         easily find the
>         > front page, currently visible only if you go specifically
>         to:
>         >
>         > http://www.sf-lug.org/index.html
>         >
>         > (If you have time, you might want to update what the 'next'
>         meetings
>         > are.  I'm very sympathetic to the problem of deferred
>         maintenance.)
>         >
>         >
>         >
>         > ----- End forwarded message -----
>         >
>         > _______________________________________________
>         > sf-lug mailing list
>         > sf-lug at linuxmafia.com
>         > http://linuxmafia.com/mailman/listinfo/sf-lug
>         > Information about SF-LUG is at http://www.sf-lug.org/
>         
>         
>         
>         _______________________________________________
>         sf-lug mailing list
>         sf-lug at linuxmafia.com
>         http://linuxmafia.com/mailman/listinfo/sf-lug
>         Information about SF-LUG is at http://www.sf-lug.org/
>         
> 






More information about the sf-lug mailing list