There is another thread very simular to this and I don't want to hi-jack his thread, With the moderators permission I will start a new one.
To send an email to a membership list on the 2nd and 3rd Tuesday of each month.
Code:
#!/bin/bash
whichmonth=$(date | awk -F" " '{print$2}')
if [ $whichmonth = 'Jan' ]; then
SecondTues=07;
ThirdTues=14;
elif [ $whichmonth = 'Feb' ]; then
SecondTues=10;
.......................
.....for the rest of the year.
fi
My question is did I do the OR symbol ( || ) right?
Code:
thisTues=$(date | awk -F" " '{print$3}')
if [ "$thisTues" = "$SecondTues" ] || [ "$thisTues" = "$ThirdTues" ]; then
echo "send email";
cd /home/dave/tffrobot/
./tuesday-flytying-send.sh
exit 0
fi
echo "not today";
exit 0
None of the books I have around the house deal with this. Google search ???? What to search for?