Hi! I am trying to read a file and every line has a specific date as one of its fields.
I want to take that date and compare it to the date today plus 6 days.
while read line
do
date=substr($line, $datepos, 8) #date is expected to be YYYYMMDD
if [ date > (date today + 6) ]; then
...proceed commands
fi
done
i need to accurately add 6 days to the current date and compare it to the date i extracted from the file.
Gurus, please help