Computing.Net > Forums > Unix > Need help extracting data from file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Need help extracting data from file

Reply to Message Icon

Name: sburgess
Date: June 1, 2007 at 10:16:00 Pacific
OS: HP-UX 11.11
CPU/Ram: 750 MHz, 4 GB Ram
Product: HP
Comment:

I need to extract all data from a file (that is dated 90 days or recent) from the day that the script is run. For ex: if the script is run on 4/1/07 I need to extract all data in the file from 01/01/07-04/01/07. The data should be put in an output file. The date the output file was created should be on the first line. The input data looks as follows:

======= 12/10/04 Begin Session (interact)
line 1
line 2
line 3

======= 12/10/04 End Session (interact)

======= 01/19/05 Begin Session (interact)
line 1
-
-
-
-
line 10

======= 01/19/05 End Session (interact)

======= 03/08/05 Begin Session (interact)
line 1
-
-
-
-
line 10
======= 03/08/05 End Session (interact)

======= 05/06/05 Begin Session (interact)
line 1
line 2
line 3
line 4
-
-
-
line 50
======= 05/06/05 End Session (interact)

Thanks

sburgess



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Need help extracting data from file

Extracting data from file using sed www.computing.net/answers/unix/extracting-data-from-file-using-sed/7660.html

Sort and seperate data from a file www.computing.net/answers/unix/sort-and-seperate-data-from-a-file-/7881.html

get data from file Linux www.computing.net/answers/unix/get-data-from-file-linux/4218.html