I have a *.txt file with data in the following format (say, file1):
06Z03JAN1948 0.023932 (and so on up to 2014...)
So, the first column contains hour (first two values), (Z stands for zullu time, I don't need that) and the rest is date. The second column contains some data (pressure gradients).
The second file (say, file2) contains dates in the format:
1011949 0 %(this would be Jan 1st, 1949 at 00 h)
1011949 6 %(this would be Jan 1st, 1949 at 06 h)
2011949 0 %(this would be Jan 2nd, 1949 at 0 h)
2011949 6 (and so on until 2010)
file1 and file2 are not the same in size; file1 is longer and has all dates from 1948 to 2014 while file2 has some of dates from 1949 to 2010.
I need to extract pressure gradient valus from file1, but only for the dates (and hours) given in file2. So it would be like this: 1011949 0 pressure gradinet value for that date
1011949 6 pressure gradinet value for that date
1011949 12 pressure gradinet value for that date
1011949 18 pressure gradient value for that date
Please, could you help me with this? I am not sure how to transfer dates from one format to other so that I compare two sets of data.