Robert wrote:
Considering my nebulous request and your apparent lack of expertise in applied clairvoyance, fine. The "3rd Monday" part is used in generating reminders to a each of a group of OldFarts that gets together monthly to inventory aches, pains and, yes, empty chairs. The "Sunday before" requirement will be used to run a script (already working) to create a series of image files containing critical stuff, to be burned (manually) to DVDs to go with me to the meeting, to be given to a trusted person for safekeeping.
The following is what I have now, stripped down to the bare essentials for clarity(?):
Looking at the way you've done it, you could to it like this:
if [$(date +%d) == $(date +%d -d $(date +%Y/%m)/$((21-$(($(date +%w -d $(date +%Y/%m)/21)-1)))))]; then // do 3rd Monday stuff... elif [$(date +%d) == $(date +%d -d $(date +%Y/%m)/$((21-$(($(date +%w -d $(date +%Y/%m)/21))))))]; then // do Sunday before stuff else // do nothing :) fi
and therefore run the NSS.sh script directly.