#!/bin/bash # Karsten M. Self Mon Mar 21 16:57:30 PST 2005 # Free use, distribution, and modification with no restrictions, granted. # NO WARRANTY # ------------------------------------------------------------------------ # Test if today is the nth weekday of the month. # ------------------------------------------------------------------------ export PATH=3D/usr/bin:/bin NTHDAY=3D$1 if [ $(( ( ( $( date +%-d) + 1 ) /7 ) )) -eq $NTHDAY ] then true else false fi