I have a csv file that looks like this:
TEST
2012-05-01 00:00:00.203 ON 1
2012-05-01 00:00:11.203 OFF 0
2012-05-01 00:00:22.203 ON 1
2012-05-01 00:00:33.203 OFF 0
2012-05-01 00:00:44.203 OFF 0
TEST
2012-05-02 00:00:00.203 OFF 0
2012-05-02 00:00:11.203 OFF 0
2012-05-02 00:00:22.203 OFF 0
2012-05-02 00:00:33.203 OFF 0
2012-05-02 00:00:44.203 ON 1
2012-05-02 00:00:55.203 OFF 0
and cannot get rid of the "TEST" string.
Is it possible to check whether a line starts with a date and read only those that do?
1 Answer