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

Russell McGaha RussellMcGaha at mac.com
Wed May 7 10:50:52 PDT 2008


Eric;

On May 7, 2008, at 11:31 AM, 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".
>
> Note, my syntax is incorrect above, but you should get the general  
> idea.
>
> Eric Crist
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix
>

On May 7, 2008, at 11:48 AM, 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,
>
> A few minutes on google turned up the following:
> http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2006-09/ 
> msg00059.html
>
> This is a decent solution if cron jobs is what you're working  
> with...  You
> should be able to peel out what's there to help build a shell script,
> though.
>
> Eric Crist
>
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix

	I didn't think it would be TOO difficult to roll my own; but I  
didn't want to re-invent the wheel ether.
	You must of used better search terms than I; as I hadn't turned up  
anything on google as of my earlier message.
	THANKS, for the responses and the pointer; it is/was MUCH appreciated.

Russell



More information about the X-Unix mailing list