-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 11:09 AM
To: Multiple recipients of list ORACLE-L
Subject: How to get unique value using AWK?
Hi All,
My manager wants to get all the unique
pipe it through uniq
Raj
Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !
-Original Message-
There is much improved version of awk called perl
and it has something called hashes. Code snippet would
look something like this:
my %Godot;
while (} {
chomp;
if (/\'([^\']+)/ {
next if exists $Godot{$1};
$Godot{$1}=undef;
}
}
foreach (sort keys %Godot) {
print $_\n;
}
On 01/22/2004
On Thu, 2004-01-22 at 10:34, Simpson, Ken wrote:
How about piping it through uniq?
uniq normally assumes the input is sorted. See my other response.
Best,
--
Edward Simmonds RHCE, OCP
- Real men don't send html email.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Try this ...
$ grep -i WAIT devdb1_ora_989.trc_orig|awk '{print $3 $4 $5 $6}'|
sort -u
Thanks,
Nikhil
-Original Message-
Sent: Thursday, January 22, 2004 11:09 AM
To: Multiple recipients of list ORACLE-L
Hi All,
My manager wants to get all the unique wait events from the trace
uniq is not ubiq. If uniq doesn't do it for you, do sort -u
-Original Message-
Sent: Thursday, January 22, 2004 10:34 AM
To: Multiple recipients of list ORACLE-L
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent:
Why not process the trace file with 9i tkprof?
It will nicely summarize the wait times for those events.
After seeing those unique wait events, your boss may ask for the wait times next!! Be
proactive
:)
- Kirti
--- Simpson, Ken [EMAIL PROTECTED] wrote:
-Original Message-
On 01/22/2004 12:04:35 PM, Bellow, Bambi wrote:
uniq is not ubiq. If uniq doesn't do it for you, do sort -u
Why would you things that way when you can do them in perl?
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Mladen Gogala
INET: [EMAIL PROTECTED]
Fat City Network
On Thu, 2004-01-22 at 10:09, [EMAIL PROTECTED] wrote:
Hi All,
My manager wants to get all the unique wait events from the trace file.
I tried the below but how do i get DISTICT wait event name?
Any help would be really appreciated.
grep -i WAIT devdb1_ora_989.trc_orig|awk '{print $3
Jay -
Try:
$ grep -i WAIT devdb1_ora_989.trc_orig|awk '{print $3 $4 $5 $6}' |
sort | uniq | more
HTH,
Dave
Hi All,
My manager wants to get all the unique wait events from the trace file.
I tried the below but how do i get DISTICT wait event name?
Any help would be really
That goes both ways, my friend. :)
-Original Message-
Sent: Thursday, January 22, 2004 11:40 AM
To: Multiple recipients of list ORACLE-L
On 01/22/2004 12:04:35 PM, Bellow, Bambi wrote:
uniq is not ubiq. If uniq doesn't do it for you, do sort -u
Why would you things that way when
Thanks Kirti and everyone who responded.
This forum is really great.
- Original Message -
Date: Thursday, January 22, 2004 12:14 pm
Why not process the trace file with 9i tkprof?
It will nicely summarize the wait times for those events.
After seeing those unique wait events, your
Reminder to post to freelists.org per Jared - I'm crossposting this reply.
Jay
Pipe your output to sort, then uniq.
grep -i WAIT devdb1_ora_989.trc_orig|awk '{print $3 $4 $5
$6}'|sort|uniq
Dennis Williams
DBA
Lifetouch, Inc.
[EMAIL PROTECTED]
-Original Message-
Sent: Thursday,
:Re: How to get unique value using AWK?
There is much improved version of awk called perl
and it has something called hashes. Code snippet would
look something like this:
my %Godot;
while (} {
chomp;
if (/\'([^\']+)/ {
next if exists $Godot{$1};
$Godot{$1}=undef;
}
}
foreach (sort
14 matches
Mail list logo