I would like to get the below in YYYY MMDD format,
Last date of the week
Last date of the month
Last date of the year
And then compare d_date with the above if it matches it has to send some email.
while read email_address; do
mail -s "$subject" $email_address < $temp/$FileName
done
How can I implement it, lets say d_date is 20140325
if ( d_date == Last date of the week )
then
...
fi