I need to write a script that will start on any day (Mon-Fri) and calculate the ending date for Friday.<br>
eg.<br>
# Get today day number<br>
DAYNO=4<br>
# Load start date = today<br>
STARTDATE=`date`<br>
# Get no of days until Friday<br>
DAYNO = 5 - $DAYNO<br>
# Load end date = friday<br>
ENDDATE=`date` + $DAYNO number of days<br>
<br>
I am using AIX 4.2 and Korn Shell.
eg.<br>
# Get today day number<br>
DAYNO=4<br>
# Load start date = today<br>
STARTDATE=`date`<br>
# Get no of days until Friday<br>
DAYNO = 5 - $DAYNO<br>
# Load end date = friday<br>
ENDDATE=`date` + $DAYNO number of days<br>
<br>
I am using AIX 4.2 and Korn Shell.