Hi,
I have a text file, foo.txt, it looks something like below. In the file there is a line that gives the date in the form of: Mon Jun 15 11:09:31 2008. I need to find which date is the newest and then store certain details of that list data to another file. So, in this sample text file, I need the data from add, mob and tele from List #1 into another file called foo1.txt because List # 1 is the newest and those three attributes are the only ones I ever need.
foo.txt:
List # Name
----- ------------------
4 george
6 george
5 george
1 george
List #: 4
Name: blah1
Tele: blah2
Mob: blah3
Add: blah4
Ext. 1: blah5
Ext. 2: blah6
Ext. 3: blah7
Date: Mon Jun 15 11:09:31 2008
List #: 6
Name: blah1
Tele: blah2
Mob: blah3
Add: blah4
Ext. 1: blah5
Ext. 2: blah6
Ext. 3: blah7
Date: Mon Jun 15 11:10:31 2008
List #: 5
Name: blah1
Tele: blah2
Mob: blah3
Add: blah4
Ext. 1: blah5
Ext. 2: blah6
Ext. 3: blah7
Date: Mon Jun 15 11:11:31 2008
List #: 1
Name: blah1
Tele: blah2
Mob: blah3
Add: blah4
Ext. 1: blah5
Ext. 2: blah6
Ext. 3: blah7
Date: Mon Jun 15 10:09:31 2008