Sponsored Content
Full Discussion: grep a range of time & date
Special Forums UNIX Desktop Questions & Answers grep a range of time & date Post 302586731 by birei on Tuesday 3rd of January 2012 05:47:44 AM
Old 01-03-2012
Hi boaz733,

One way using 'perl':
Code:
$ perl -ne 'if ( /2012\/01\/02 12:00:07/ .. /2012\/01\/03 12:00:08/ ) { print }' infile
result.log.00:2012/01/02 12:00:07.422    LOG STARTED HERE
  N6Kashya29MemoryShieldScheduler_AO_IMPLE, pid=8662/8658,
config=(alertThreshold=10,alertLevel=0,killThreshold=7200,coreThreshold=0,full=1),
deltaTime=0,
cmd=N6Kashya59MemoryShieldScheduler_AO_IMPL_printStatistics_6_CmdConcreteE
2012/01/02 16:53:18.228 - #0 - 8662/8658 - MemoryShield: errno=0 Assertionresult.log.00:2012/01/02 12:22:36.558  
 result.log.00:2012/01/02 19:39:33.562    LOG STARTED HEREN6Kashya29MemoryShieldScheduler_AO_IMPLE, pid=8662/8658,
result.log.00:2012/01/03 12:00:08.444   LOG STARTED  HERE

Regards,
Birei
These 2 Users Gave Thanks to birei For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Backup Date & Time

:confused: I'm not really sure about the default backup date & time in our Unix system and I would like to change it to a convienient time...how do I do that? Please help? (1 Reply)
Discussion started by: EbeyeJJ
1 Replies

2. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

Hi guys, I know that this topic has been discuss numerous times, and I have search the net and this forum for it. However, non able to address the problem I faced so far. I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies

3. Shell Programming and Scripting

grep - date & time range

Hi, I need to search email files by date & time range in email files. The timezone is not important. Can someone plz advise how i can do this ? For e.g A user can specify only A single date A date range date & time range Below is part of the email file. (4 Replies)
Discussion started by: coolatt
4 Replies

4. Shell Programming and Scripting

About date & time difference

Hello All, I was having a look on threads on the Forum about time calculation but didn't find exactly this issue. For instance, if we have these 2 dates, begin & end : 20100430235830 20100501000200 Is there anyway, awk, ksh, perl to calculate the difference in sec and get for... (6 Replies)
Discussion started by: rany1
6 Replies

5. Shell Programming and Scripting

Grep by range of date from file creation in directory

Hi Expert, Need your scripting and finding data so that it help me to find the culprit of this memory usage error. Data provided here is a sample. Process Snapshot directory: /var/spool/processes-snapshot webdev9o9% pwd /var/spool/processes-snapshot webdev9o9% ls -lrct -rw-r--r-- ... (3 Replies)
Discussion started by: regmaster
3 Replies

6. Shell Programming and Scripting

Date and time range extraction via Awk or analysis script?

Hello does anyone know of an awk that will extract log file entries between a specific date and time range, eg: awk '/15\/Dec\/2010:16:10:00/, /15\/Dec\/2010:16:15:00/' access_log but one that works? Or a free command line log file analysis tool/script? I'd like to be able to view... (2 Replies)
Discussion started by: competitions
2 Replies

7. Programming

DATE & TIme

Can we select the datetime from oracle database in “hhmmssnnnccyymmdd” format ? please help to solve this..... (2 Replies)
Discussion started by: Sanal
2 Replies

8. Shell Programming and Scripting

How to put date range from a perl & sql script

Hi Guys, Can someone please help me on adding/inserting a variable date to an sql scipt? Basically I want to assign a 7 days date range. As shown below.. #!/usr/bin/perl use strict; use Env qw(ORACLE_HOME); my $SQLPLUS='/opt/oracle/product/10.1.0/db_1/bin/sqlplus -S... (1 Reply)
Discussion started by: pinpe
1 Replies

9. Shell Programming and Scripting

run script in time and date range

i need to run one script inside of other, and there is some terms - main script in scheduled in cron for everyday runing every 5min - i need to run /tmp/script2.sh after first 3 days in month - i need to run /tmp/script2.sh from 7-9AM, main script is runining all day all recommendations are... (1 Reply)
Discussion started by: waso
1 Replies

10. 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
GLANCE-CACHE-PREFETCHER(1)					      Glance						GLANCE-CACHE-PREFETCHER(1)

NAME
glance-cache-prefetcher - Glance Cache Pre-fetcher GLANCE IMAGE CACHE PRE-FETCHER Author glance@lists.launchpad.net Date 2012-01-03 Copyright OpenStack LLC Version 2012.1-dev Manual section 1 Manual group cloud computing SYNOPSIS glance-cache-prefetcher [options] DESCRIPTION This is meant to be run from the command line after queueing images to be pretched. OPTIONS --version show program's version number and exit -h, --help show this help message and exit --config-file=PATH Path to a config file to use. Multiple config files can be specified, with values in later files taking precedence. The default files used are: [] -d, --debug Print debugging output --nodebug Do not print debugging output -v, --verbose Print more verbose output --noverbose Do not print verbose output --log-config=PATH If this option is specified, the logging configuration file specified is used and overrides any other logging options specified. Please see the Python logging module documentation for details on logging configuration files. --log-format=FORMAT A logging.Formatter log message format string which may use any of the available logging.LogRecord attributes. Default: none --log-date-format=DATE_FORMAT Format string for %(asctime)s in log records. Default: none --log-file=PATH (Optional) Name of log file to output to. If not set, logging will go to stdout. --log-dir=LOG_DIR (Optional) The directory to keep log files in (will be prepended to --logfile) --use-syslog Use syslog for logging. --nouse-syslog Do not use syslog for logging. --syslog-log-facility=SYSLOG_LOG_FACILITY syslog facility to receive log lines SEE ALSO o OpenStack Glance BUGS o Glance is sourced in Launchpad so you can view current bugs at OpenStack Glance AUTHOR
OpenStack COPYRIGHT
2010-present, OpenStack, LLC. 2012.1.1 March 14, 2013 GLANCE-CACHE-PREFETCHER(1)
All times are GMT -4. The time now is 04:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy