Thanks sbrews for your help. I forgot to mention that I was using kshell and not perl. Thanks very much
# Get current week day
# %u Displays the weekday as a decimal number from 1-7 (Sunday = 7)
DATEWEEK=`date +"%u"`
# Constants for Friday
FRIDAY=5
# Get Last Friday as ddmonyyyy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.