![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hell and sqlite | ogoy | Shell Programming and Scripting | 2 | 05-21-2008 12:07 AM |
| rpm hell! | knmwt15000 | UNIX for Dummies Questions & Answers | 7 | 03-27-2002 06:06 AM |
| mathematics in shell script | sureshy | UNIX for Dummies Questions & Answers | 2 | 03-21-2002 12:04 PM |
| mathematics operations in unix | cesar720213 | UNIX for Dummies Questions & Answers | 2 | 11-22-2001 11:24 AM |
| negative UID/GID?!! I can see 'em but what the hell do they mean?! | hellz | UNIX for Dummies Questions & Answers | 2 | 09-07-2001 03:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hell & mathematics
I've been able to generate output based on the code scarfake provided me (thanks again man).
A little background so everyone more or less knows whats going on: I needed code that would propagate a database with 100,000 entries, for capacity testing purposes, something like a stress test. Now I have the results based on timestamps. The timestamps are shown as [1211425845]. [22445] [1211425845](1Jz1CX-0007Qa-7X) MINE::EXIMDB::SF::wblist_check BEGIN [22445] [1211425846](1Jz1CX-0007Qa-7X) MINE::EXIMDB::SF::wblist_check END I was told these timestamps are in seconds. Which means the above output equates to a 1 second interval from beginning (BEGIN) to end (END). If anyone can provide code that would do the math showing how many second(s) intervals per BEGIN and END. My grep command might help: grep "BEGIN\|END" /mine/output.log Thanks for looking ![]() |
|
||||
|
Quote:
Code:
awk '$NF=="BEGIN"{a=substr($0,10,10)}$NF=="END"{print substr($0,10,10)-a}' data.file
Last edited by danmero; 05-26-2008 at 09:41 PM.. Reason: get shorther |
|
||||
|
Thanks for the tip, I'll look into that.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|