Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

24 hour script

Posted on 2004-09-03
3
Medium Priority
?
172 Views
Last Modified: 2013-12-26
Sample of the file I have to extract data from:

Khaoki is begun 2003/07/02 01:00:10
It’s a girl
She works
She enjoys computers
Khaoki is ended 2003/07/02/01:00:30
Khaoki is begun 2003/07/02 01:10:10
It’s a girl
She works
She enjoys computers
Khaoki is ended 2003/07/02/01:10:21
Khaoki is begun 2003/07/02 01:20:10
It’s a girl
She works
She enjoys computers
What a snazzy lady
Khaoki is ended 2003/07/02/01:20:54
Khaoki is begun 2003/07/02 01:30:10
It’s a girl
She works
She enjoys computers
Khaoki is ended 2003/07/02/01:30:45
Khaoki is begun 2003/07/02 01:40:10
It’s a girl
A lady that needs asistance
She works
She enjoys computers
Khaoki is ended 2003/07/02/01:40:21
Khaoki is begun 2003/07/02 01:50:10
It’s a girl
She works
How is it being in Unix
She enjoys computers
Khaoki is ended 2003/07/02/01:50:21

Thanks,the cron part I know.The problem is the script. I must extract from the first statement of a file.The process is from Khaoki is begun and it ends at the line where there is Khaoki is ended.The process executes every few minutes,for an example 10 minutes. And each process is unique, meaning that the lines in between begun and ended are not equal(Not the same amount).

0
Comment
Question by:khaoki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 21

Accepted Solution

by:
tfewster earned 200 total points
ID: 11977019
I'm not sure what you're trying to achieve - Could you post an example of the end result you want to get?

You can use awk to split the file into "records", e.g.
awk 'BEGIN {RS="Khaoki is ended"} {print $0 "End of record\n"}' < logfile
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question