last working day of previous month

Hi,

I want a script(ksh) to see if today is the last working day(Mon-Fri) of the month. If it is the last working day I need to print current date, else I need the last working day of previous month. Thanks in advance.

See the FAQ for the forums - look for the 'date arithmetic' thread by perderabo.
The datecalc script is what you want,