[X-Unix] shell script to determine 1st business day of month ?

Doug McNutt douglist at macnauchtan.com
Wed May 7 10:09:42 PDT 2008


At 11:31 -0500 5/7/08, <ecrist at secure-computing.net> wrote:
>On Wed, 7 May 2008 10:40:11 -0500, Russell McGaha <RussellMcGaha at mac.com>
>wrote:
>> Folks;
>> 	Do any of you know of a script callable from BASH, that will / can
>> say if today (or a given date) is the first business day of the month??
> #!
>Russell,
>
>It wouldn't be too difficult to write a simply shell script to figure this
>out for yourself.  Something like a loop, foreach $day do; $day == $day++;
>if $dayofweek != (Saturday|Sunday) then echo "first business day".

I once tried that with M$Excel VBA macros and discovered that the math was easy but the politics made the result useless for what I wanted which was to figure dates that were business days for banking.

Altogether too often the first day insisted on being a bank holiday that was only discoverable with access to someone's ever changing database that even depended on the state or province.

-- 

--> From the U S of A, the only socialist country that refuses to admit it. <--


More information about the X-Unix mailing list