0
I have a file that looks like:
ASDF,100090,D84,2007-12-29T01:07:35Z
ASDF,101090,F84,2008-01-03T01:09:36Z
ASDF,101190,h84,2008-01-04T01:07:31Z
ASDF,178915,r54,2008-01-15T01:09:21Z
ASDF,144290,k74,2008-02-05T01:03:31Z
I want to find the count of lines older than date 2008-01-10
.
I am able to list the dates with the command cut -d "," -f 4 2008A.csv | cut -d "T" -f 1
:
2007-12-29
2008-01-03
2008-01-04
2008-01-15
2008-02-05
But how do I find the number of lines older than 2008-01-10
?
Thanks for the reply. File contains dates of different months and years. Is it possible to convert the string values to date and then filter them after comparing with a date, say
2008-01-10
? – Manu – 2017-12-29T08:54:48.637If you want a random date, then Kamil's answer is as good as it gets. – xenoid – 2017-12-29T10:08:06.493