Check, if date is not today

hello,

in a file exist entries in date format YYYYMMDD. i want to find out, if there are dates, which isn't today's date.

file:
date example text
20140714 <= not today's date
20140715 <= not today's date
20140716 <= today's date

my idea is to use Perderabo's datecalc

i will store in a variable with

date

today's date and for every entry i use

datecalc

and compare the strings ?

example :

Wednesday

Tuesday

So Tuesday isn't Wednesday and it isn't today's date ?

better ideas ?

regards

how 15 is today's date?

20140715 <= today's date

today=$(date +%Y%m%d)
grep -v "${today}" filename
1 Like

i corrected it in my post, your solution is easier, without date functions