Any one can help me how to check where the Monday is 1st mony or scond monday
Thanks in advance
Printable View
Any one can help me how to check where the Monday is 1st mony or scond monday
Thanks in advance
I came up with something like
the nested if could also become a switch case statement.Code:ToDay=$(date +"%u")
CurDoM=$(date +"%d")
if [ $ToDay .eq "Mon" ]; then
if [ $CurDoM .le 7 ]; then
# # its the first monday of the month
elif [ $CurDoM .le 14 ]; then
## Its the second monday of the month
fi
fi