Sponsored Content
Top Forums Shell Programming and Scripting grep with date & unique output Post 302706817 by Daniel Gate on Thursday 27th of September 2012 12:16:02 PM
Old 09-27-2012
grep with date & unique output

alert.log has the entries with
HTML Code:
ORA-XXXX
,

HTML Code:
....
Mon Sep 24 15:08:09 2012
WARNING: inbound connection timed out (ORA-3136)
Mon Sep 24 15:08:09 2012
WARNING: inbound connection timed out (ORA-3136)
Mon Sep 24 15:08:09 2012
WARNING: inbound connection timed out (ORA-3136)
Mon Sep 24 15:15:01 2012
Thread 2 advanced to log sequence 17004
  Current log# 8 seq# 17004 mem# 0: /dev/rprod_rdo_015
  Current log# 8 seq# 17004 mem# 1: /dev/rprod_rdo_016
Mon Sep 24 15:15:04 2012
LNS: Standby redo logfile selected for thread 2 sequence 17004 for destination LOG_ARCHIVE_DEST_2
Mon Sep 24 15:15:04 2012
LNS: Standby redo logfile selected for thread 2 sequence 17004 for destination LOG_ARCHIVE_DEST_3
Mon Sep 24 15:30:02 2012
....
If I do
HTML Code:
grep ORA-3136 alert.log
, then it just gives,
HTML Code:
WARNING: inbound connection timed out (ORA-3136)
WARNING: inbound connection timed out (ORA-3136)
WARNING: inbound connection timed out (ORA-3136)
....
I need to have with the date and time associated with.
The date and time is always right above the error content.

HTML Code:
Mon Sep 24 15:08:09 2012
WARNING: inbound connection timed out (ORA-3136)
The same entries can be there more than one. In that case, I need to pull out the unique output so that I can avoid duplicates.

Please advise.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

vmstat output with date & timestamp

Hello all This is a sample vmstat output ... $ vmstat 2 2 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr hx hx hx hx in sy cs us sy id 1 0 0 23105784 7810488 323 767 1742 5 5 0 0 0 0 0 0 683 780 457 43 ... (9 Replies)
Discussion started by: luft
9 Replies

2. Shell Programming and Scripting

unique number for a date

Hello, In korn-shell, how can I do to have an unique number for a date done. I want to use it to have the number of days between two dates. Thanks in advance. (4 Replies)
Discussion started by: madmat
4 Replies

3. Shell Programming and Scripting

get part of file with unique & non-unique string

I have an archive file that holds a batch of statements. I would like to be able to extract a certain statement based on the unique customer # (ie. 123456). The end for each statement is noted by "ENDSTM". I can find the line number for the beginning of the statement section with sed. ... (5 Replies)
Discussion started by: andrewsc
5 Replies

4. 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

5. UNIX for Dummies Questions & Answers

Grep Unique

Hello, I have a file with a list of car makes and specific information for each make. An example is: @Audi:Warranty @Audi:Pricing @Audi:Colors @Acura:Warranty @Acura:Pricing @Acura:Colors and so on through a bunch of makes. I need to make a list in a selection box of just one name of... (4 Replies)
Discussion started by: macbb1117
4 Replies

6. Shell Programming and Scripting

How to combine 2 files and output the unique & difference?

Hi Guys, I have two input files and I want to combine them and get the unique values and differences and put them into one file. See below desired output file. Inputfile1: 1111111 2222222 3333333 7860068 7860069 7860071 7860072 Inputfile2: 4444444 (4 Replies)
Discussion started by: pinpe
4 Replies

7. UNIX Desktop Questions & Answers

grep a range of time & date

how can i grep a range? i have a text file with the following text: 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,... (1 Reply)
Discussion started by: boaz733
1 Replies

8. Shell Programming and Scripting

Grep & sed - Output

Hi All, Facing an issue with grep & sed I have logs as below: gsc_1_20121121.log:2012-11-21 10:09:13,143 INFO - fmsspace.1 ProcessNewOrderSingleRequest: Result - ProcessNewOrderSingleBatchResultDTO - success:true,newOrderSingleBatchResults:ProcessNewOrderSingleResultDTO -... (13 Replies)
Discussion started by: irfanmemon
13 Replies

9. Programming

find & Replace text using two non-unique delimiters.

I can find and replace text when the delimiters are unique. What I cannot do is replace text using two NON-unique delimiters: Ex., "This html code <text blah >contains <garbage blah blah >. All tags must go,<text > but some must be replaced with <garbage blah blah > without erasing other... (5 Replies)
Discussion started by: bedtime
5 Replies
HTML::FormFu::Element::Radiogroup(3pm)			User Contributed Perl Documentation		    HTML::FormFu::Element::Radiogroup(3pm)

NAME
HTML::FormFu::Element::Radiogroup - Group of radiobutton form fields SYNOPSIS
YAML config: --- elements: - type: Radiogroup name: sex options: - [ 'm', 'Male' ] - [ 'f', 'Female' ] DESCRIPTION
Convenient to use group of radio button fields. Use the same syntax as you would to create a Select element optgroup to create RadioGroup sub-groups, see "options" in HTML::FormFu::Element::_Group for details. METHODS
options See "options" in HTML::FormFu::Element::_Group. values See "values" in HTML::FormFu::Element::_Group. value_range See "value_range" in HTML::FormFu::Element::_Group. empty_first See "empty_first" in HTML::FormFu::Element::_Group. auto_id In addition to the substitutions documented by "auto_id" in HTML::FormFu, %c will be replaced by an incremented integer, to ensure there are no duplicated ID's. --- elements: type: Radiogroup name: foo auto_id: "%n_%c" reverse_group See "reverse_group" in HTML::FormFu::Element::Checkboxgroup. SEE ALSO
Is a sub-class of, and inherits methods from HTML::FormFu::Element::Checkboxgroup, HTML::FormFu::Element::_Group, HTML::FormFu::Element::_Field, HTML::FormFu::Element HTML::FormFu AUTHOR
Carl Franks, "cfranks@cpan.org" LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-23 HTML::FormFu::Element::Radiogroup(3pm)
All times are GMT -4. The time now is 05:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy