Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sar Loader Script?

RE: Sar Loader Script?

From: Ferris, Shawn <Shawn.Ferris_at_twtelecom.com>
Date: Mon, 05 Feb 2001 11:17:29 -0800
Message-ID: <F001.002AAAD9.20010205081118@fatcity.com>

> My problem is that the timestamp, which is just that--no date, is only on
the
> first record of each sample rather than every record and I don't want the
blank
> lines in between the samples. Perhaps this is a simple awk routine but
> I don't know awk well enough to do this.
 

awk '{ if (NF>7) {time=$1;print $0} else print time,$0}'  

This is off the top of my head. I'm sure there is a more elegant method. This will add the time field to each record. I didn't take it any further. The next problem is quoting the correct fields. (You can hard code it) I just didn't feel like it. 8) (I would've used perl/DBD w/ bind variables.)  

HTH
Shawn M Ferris
Oracle DBA - Time Warner Telecom  

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ferris, Shawn
  INET: Shawn.Ferris_at_twtelecom.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Feb 05 2001 - 13:17:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US