Sponsored Content
Top Forums Shell Programming and Scripting searching between start and end time Post 302281463 by wakhan on Thursday 29th of January 2009 01:01:25 AM
Old 01-29-2009
searching between start and end time

Hello All,

Below mentioned is my log file.

I want to make a script which ask for start time and then end time and then search particular word between those lines.

Like
start time:2
end time: 4
and then search all values starting from cell 84 between this time.

Please Help

Regards,

Code:
01/29/09 02:20:39 #283986
^Y
M 15 OP:ALARM
     CELL 74, CDM 1 CDMA BASEBAND RADIO (CBR) 2
     CELL 74, CDM 1 CDMA BASEBAND RADIO (CBR) 3
     CELL 74, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 1
     CELL 74, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 1
     CELL 74, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 1
     CELL 74, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 2
     CELL 74, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 2
     CELL 74, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 2
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 1
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 2
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 4
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 5

01/29/09 03:10:39 #283986
^Y
M 15 OP:ALARM
     CELL 74, CDM 1 CDMA BASEBAND RADIO (CBR) 2
     CELL 74, CDM 1 CDMA BASEBAND RADIO (CBR) 3
     CELL 74, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 1
     CELL 74, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 1
     CELL 74, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 1
     CELL 74, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 2
     CELL 74, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 2
     CELL 74, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 2
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 1
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 2
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 4
     CELL 74, ASMB 1 TRANSMITTER AMP INDETERMINATE 5

01/29/09 04:01:39 #283986
^Y
M 15 OP:ALARM
     CELL 14, CDM 1 CDMA BASEBAND RADIO (CBR) 2
     CELL 24, CDM 1 CDMA BASEBAND RADIO (CBR) 3
     CELL 34, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 1
     CELL 34, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 1
     CELL 34, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 1
     CELL 84, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 2
     CELL 84, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 2
     CELL 84, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 2
     CELL 4, ASMB 1 TRANSMITTER AMP INDETERMINATE 1
     CELL 54, ASMB 1 TRANSMITTER AMP INDETERMINATE 2
     CELL 54, ASMB 1 TRANSMITTER AMP INDETERMINATE 4
     CELL 64, ASMB 1 TRANSMITTER AMP INDETERMINATE 5

01/29/09 05:01:39 #283986
CELL 34, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 1
     CELL 84, CDM 1 CBR 1 TRANSMIT PORT (TXPORT) 2
     CELL 84, CDM 1 CBR 2 TRANSMIT PORT (TXPORT) 2
     CELL 84, CDM 1 CBR 3 TRANSMIT PORT (TXPORT) 2
     CELL 4, ASMB 1 TRANSMITTER AMP INDETERMINATE 1
     CELL 54, ASMB 1 TRANSMITTER AMP INDETERMINATE 2
     CELL 54, ASMB 1 TRANSMITTER AMP INDETERMINATE 4
     CELL 64, ASMB 1 TRANSMITTER AMP INDETERMINATE 5
01/29/09 06:01:39 #283986

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Working out end time from start + elapsed

Hi, I'm writing a script and have become stuck trying to define a variable (COMP) by adding an elapsed time (ELAPSE e.g 00:55) to a start time (START e.g 23:50). Can anybody give me a solution as to how I can get a completion time in hh:mm from the variables above? thanks Richard (4 Replies)
Discussion started by: rik1551
4 Replies

2. Shell Programming and Scripting

Start time/end time and status of crontab job

Is there anyway to get the start time and end time / status of a crontab job which was just completed? Of course, we know the start time of the crontab job since we are scheduling. But I would like to know process start and time recorded somewhere or can be fetched from a command like 'ps'. ... (3 Replies)
Discussion started by: thambi
3 Replies

3. Shell Programming and Scripting

How to get data between the start time and end time?

Hi, Can anyone help me how can I get the line that between the start time and end time. file1.txt 15/03/2009 20:45:03 Request: - Data of this line 15/03/2009 20:45:12 Response: - Data of this line 15/03/2009 22:10:40 Request: - Data of this line 15/03/2009 22:10:42 Response: - Data of... (1 Reply)
Discussion started by: tanit
1 Replies

4. UNIX for Dummies Questions & Answers

script start and end of execution of time

Hi All, Can we get to know the start time and end time of execution of a script? (This script doesn't write any logs.) I mean, is there any built in process logs to track these records? (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

5. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

6. UNIX for Dummies Questions & Answers

Setup a cron job and specified the start and end time

Hi guys, How can I specify the start and end time of a cron job. And my start time and end time are specified by minutes. For example, I want to set up a cron runs every 3 minutes from 18:40 to midnight. How can i do this please? Many thanks Best regards, Clu (4 Replies)
Discussion started by: clu
4 Replies

7. Shell Programming and Scripting

Getting the Start, End time and duration using date command

Oracle Enterprise Linux We want to track how long a process takes to complete its execution. This is what we want in the schell script Before the process is started , get the time with date, hours and minutes execute the process After the process has ended , get the time with date,... (5 Replies)
Discussion started by: omega3
5 Replies

8. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

9. Programming

DB2 Query to check table counts,start end time

Dear team I am using DB2 and wish to capture the ETL status on daily basis so that i can run the query and share the details in xls format to respective mail ids . Currently i am using below query but this displays table name and counts for latest run. select name ,CARD from... (0 Replies)
Discussion started by: Perlbaby
0 Replies
voice_set_playmode(3alleg4)					  Allegro manual				       voice_set_playmode(3alleg4)

NAME
voice_set_playmode - Adjusts the loop status of the specified voice. Allegro game programming library. SYNOPSIS
#include <allegro.h> void voice_set_playmode(int voice, int playmode); DESCRIPTION
Adjusts the loop status of the specified voice. This can be done while the voice is playing, so you can start a sample in looped mode (hav- ing set the loop start and end positions to the appropriate values), and then clear the loop flag when you want to end the sound, which will cause it to continue past the loop end, play the subsequent part of the sample, and finish in the normal way. The mode parameter is a bitfield containing the following values: PLAYMODE_PLAY Plays the sample a single time. This is the default if you don't set the loop flag. PLAYMODE_LOOP Loops repeatedly through the sample, jumping back to the loop start position upon reaching the loop end. PLAYMODE_FORWARD Plays the sample from beginning to end. This is the default if you don't set the backward flag. PLAYMODE_BACKWARD Reverses the direction of the sample. If you combine this with the loop flag, the sample jumps to the loop end position upon reaching the loop start (ie. you do not need to reverse the loop start and end values when you play the sample in reverse). PLAYMODE_BIDIR When used in combination with the loop flag, causes the sample to change direction each time it reaches one of the loop points, so it alternates between playing forwards and in reverse. SEE ALSO
Allegro version 4.4.2 voice_set_playmode(3alleg4)
All times are GMT -4. The time now is 07:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy