Sponsored Content
Top Forums Shell Programming and Scripting How can i grep for an hour before data Post 302340586 by rdhanek on Tuesday 4th of August 2009 03:02:17 AM
Old 08-04-2009
protocomm, i am getting the current hour data with that..i need previous hour data.
for example, current time is 06:48. I need the data from 05:00 to 05:59
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help in hour grep

i have this script that checks for yesterday date and also specific hour in that ----------------------------------------------------------------- TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d %k` cd logs count=0 for i in DBMaint.log do cat $i | grep $a >> file12.txt done... (0 Replies)
Discussion started by: ali560045
0 Replies

2. Shell Programming and Scripting

generating data for 1 hour

Hi Folks, The reqirement is that i need to generate 1 hr file with a time interval of five minutes.. For ex: my i/p is 0000-0000 and desired o/p is 0000-0005 0005-0010 0010-0015 0015-0020 0020-0025 0025-0030 0030-0035 0040-0045 0050-0055 0055-0100 Script neede urgent ... (0 Replies)
Discussion started by: aajan
0 Replies

3. Shell Programming and Scripting

Counting average data per hour

Hi i have log like this : Actually i will process the data become Anybody can help me ? (6 Replies)
Discussion started by: justbow
6 Replies

4. UNIX for Advanced & Expert Users

filter last 24 hour data and put in new file

i have file server 1 (filesvr01acess.log) and disc server 1 (discsvr01acess.log) in unix box(say ip adress of the box 10.39.66.81) Similiarly i have file server 2 (filesvr01acess.log) and disc server 2(discsvr01acess.log) in another unix box(say ip adress of the box 10.39.66.82). Now my... (1 Reply)
Discussion started by: nripa1
1 Replies

5. Shell Programming and Scripting

Grep string from logs of last 1 hour on files of 2 different servers and calculate count

Hi, I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows: 27-Aug-2010... (4 Replies)
Discussion started by: poweroflinux
4 Replies

6. Shell Programming and Scripting

Finding/Grep on files with date and hour in the file name

Hi, I have a folder structure as follows, DATA -> 2012-01-01 -> 00 -> ABC_2012-01-03_00.txt -> 01 -> ABC_2012-01-03_01.txt -> 02 -> ABC_2012-01-03_02.txt ... -> 23 -> ABC_2012-01-03_02.txt -> 2012-01-02 -> 2012-01-03 So the dir DATA contains the above hierarchy, User input Start and... (6 Replies)
Discussion started by: mihirvora16
6 Replies

7. UNIX for Advanced & Expert Users

Finding/Grep on files with date and hour in the file name

Hi, I have a folder structure as follows, DATA -> 2012-01-01 -> 00 -> ABC_2012-01-03_00.txt -> 01 -> ABC_2012-01-03_01.txt -> 02 -> ABC_2012-01-03_02.txt ... -> 23 -> ABC_2012-01-03_02.txt -> 2012-01-02 ... (1 Reply)
Discussion started by: mihirvora16
1 Replies

8. Shell Programming and Scripting

How to convert 24 hour time to 12 hour timing?

Hi friends, I want to convert 24 hour timing to 12 hour please help me... my data file looks like this.. 13-Nov-2011 13:27:36 15.32044 72.68502 13-Nov-2011 12:08:31 15.31291 72.69807 16-Nov-2011 01:16:54 15.30844 72.74028 15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Discussion started by: nex_asp
13 Replies

9. Shell Programming and Scripting

Grep in a log file within a time range (hour)

Hi, im trying to write a grep script that returns me the last inputs added in the last hour in the log file. Literally i have nothing yet but: grep 'Line im looking for' LOGFILE.log | tail -1 this only gives me the last input, but no necessarily from the last hour. Help Please. (4 Replies)
Discussion started by: blacksteel1988
4 Replies

10. Shell Programming and Scripting

Average of multiple time-stamped data every half hour

Hi All, Thank you for reading through my post and helping me figure out how I would be able to perform this task. For example: I have a list of continuous output collected into a file in the format as seen below: Date...........Time........C....A......... B ==========================... (5 Replies)
Discussion started by: terrychen
5 Replies
PX_TIMESTAMP2STRING(3)					     Library Functions Manual					    PX_TIMESTAMP2STRING(3)

NAME
PX_timestamp2string -- Convert paradox timestamp into formated string SYNOPSIS
#include <paradox.h> char * PX_timestamp2string(pxdoc_t *pxdoc, double timestamp, const char *format) DESCRIPTION
Creates a string representation of a paradox timestamp as specified in the parameter format. The timestamp must be either retrieved with PX_get_data_double(3) after calling PX_get_record(3) or by simply using the double value in the pxval_t struct as returned by PX_retrieve_record(3). A timestamp contains both time and date information. The format string contains chars which stand for certain values of the date/time. The following table lists all available characters with a meaning. All other characters are being copied unmodified to the output string. If a special character shall not be interpreted it must be preceded with a backslash. Characters and their meaning in date/time format string Character Meaning Y year, numeric, 4 digits y year, numeric, 2 digits m month, numeric n month, numeric, no leading zeroes d day of the month, numeric j T{ day of the month, numeric, no leading zeros T} H hour, numeric, 24 hour format h hour, numeric, 12 hour format G T{ hour, numeric, 24 hour format, no leading zeroes T} g T{ hour, numeric, 12 hour format, no leading zeroes T} i minutes, numeric s seconds, numeric A AM/PM a am/pm L boolean for leap year RETURN VALUE
Returns pointer to string on success and NULL on failure. SEE ALSO
PX_time2string(3), PX_date2string(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PX_TIMESTAMP2STRING(3)
All times are GMT -4. The time now is 11:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy