Sponsored Content
Top Forums Shell Programming and Scripting Selection of records y time and offset. Post 302990914 by jiam912 on Thursday 2nd of February 2017 04:51:25 PM
Old 02-02-2017
Dear Xl

I have test the code and works perfect.

There is only one think to change.

the
Code:
 stime

should be in sec , then i was trying to change it like this.

# Skip lookahead when diff is greater than 25sec

Code:
	    stime1 = (dtime[2] - dtime[1])
	    	        
	    if((((dtime[2] - dtime[1])-100)+60) > 25) next

         	       	    
	    if(stime1>=40)stime = (((dtime[2] - dtime[1])-100)+60)
	    else stime = (dtime[2] - dtime[1])

kindly, can you check it. because i try it but does not work.

Everything else is working perfect.

Thanks for your help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perform selection and deletion at the same time

I am performing some operation like: SQL Statement below: UPDATE table2 SET column1_table2 = ( SELECT column1_table1 FROM table1 WHERE column2_table1 = column2_table2 LIMIT 1) LIMIT 2; So what I'm trying to do is to find a corresponding value and then I'm adding it into table2. Now how... (2 Replies)
Discussion started by: Legend986
2 Replies

2. Shell Programming and Scripting

deleting multiple records from a huge file at one time

I have a very big file of 5gb size and there are about 50 million records in there. I have to delete the records based on recrord number that I know fromoutside with out opening the file. The record numbers are very random like 5000678, 7890005 etc. Can somebody let me know how i can... (5 Replies)
Discussion started by: dsravan
5 Replies

3. Programming

Negative Offset

Function: int fcntl(int fd, int cmd, struct flock * lock) Data Type: struct flock This structure is used with the fcntl function to describe a file lock. It has these members: off_t l_start This specifies the offset of the start of the region to which the lock applies, and... (1 Reply)
Discussion started by: DNAx86
1 Replies

4. Shell Programming and Scripting

awk scripting - matching records and summing up time

Hello. I just found out about awk, and it appears that this could handle the problem I'm having right now. I first stumbled on the thread How to extract first and last line of different record from a file, and that problem is almost similar to mine. In my case, an ASCII file will contain the... (0 Replies)
Discussion started by: Gonik
0 Replies

5. Shell Programming and Scripting

Scroll records from database, one at a time

Hi, I need to come up with a site that will display all the records in the database, but one at a time. Not sure how to go about it. Please pour in your suggestions. Thanks ---------- Post updated at 04:38 AM ---------- Previous update was at 12:52 AM ---------- Can... (3 Replies)
Discussion started by: sh_kk
3 Replies

6. Shell Programming and Scripting

Find records using epoch time.

How do i find the record which has been edit the last 10 minutes? from a.txt which has last field is epoch time updated. 10/17/2012 1:47 PM||||||In Use|chicken||1350005487 10/17/2012 2:53 PM||||||Available|chicken||13500000 10/17/2012 3:20 PM||||||In Use|cat||1351000000 10/17/2012 3:22... (2 Replies)
Discussion started by: sabercats
2 Replies

7. UNIX for Advanced & Expert Users

Grep --byte-offset not returning the offset (Grep version 2.5.1)

Hi, I am trying to get the position of a repeated string in a line using grep -b -o "pattern" In my server I am using GNU grep version 2.14 and the code is working fine. However when I am deploying the same code in a different server which is using GNU grep version 2.5.1 the code is not... (3 Replies)
Discussion started by: Subhamoy
3 Replies

8. UNIX for Dummies Questions & Answers

File name offset

Dear all, I want to offset the file numbers. can you please make some awk code or linux code for the same. Example: input file names ANI_WFMASS_PIST00001.gif ANI_WFMASS_PIST00002.gif . . . ANI_WFMASS_PIST0000n.gif offset --> 30 ANI_WFMASS_PIST00031.gif ANI_WFMASS_PIST00032.gif... (14 Replies)
Discussion started by: kri321shna
14 Replies

9. Shell Programming and Scripting

Grep 'time' in save records

Hi Team, Is there a way to grep time taken to save records. Its like there is one webpage where when I click save button taking so much time to save result. Therefore, I want to grep that time taken to save that record from file.log Thanks in advance. (1 Reply)
Discussion started by: TCS
1 Replies

10. Shell Programming and Scripting

Help with split a list of records into each line with 200 coordinate at a time

Input File: E 3359799 3360148 350 X D 3471287 3471607 321 X E 3359799 3360740 942 X E 4359790 4360039 250 X . . . Desired Output File: E 3359799 3359998 200 X E 3359999 3360148 150 X D 3471287 3471486 200 X D 3471487 3471607 121 X E 3359799 3359998 200 X E 3359999 3360198 200 X... (1 Reply)
Discussion started by: perl_beginner
1 Replies
STIME(2)						     Linux Programmer's Manual							  STIME(2)

NAME
stime - set time SYNOPSIS
#include <time.h> int stime(time_t *t); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): stime(): _SVID_SOURCE DESCRIPTION
stime() sets the system's idea of the time and date. The time, pointed to by t, is measured in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). stime() may be executed only by the superuser. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EFAULT Error in getting information from user space. EPERM The calling process has insufficient privilege. Under Linux the CAP_SYS_TIME privilege is required. CONFORMING TO
SVr4. SEE ALSO
date(1), settimeofday(2), capabilities(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-02-25 STIME(2)
All times are GMT -4. The time now is 04:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy