![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hell and sqlite | ogoy | Shell Programming and Scripting | 2 | 05-20-2008 09:07 PM |
| rpm hell! | knmwt15000 | UNIX for Dummies Questions & Answers | 7 | 03-27-2002 02:06 AM |
| mathematics in shell script | sureshy | UNIX for Dummies Questions & Answers | 2 | 03-21-2002 08:04 AM |
| mathematics operations in unix | cesar720213 | UNIX for Dummies Questions & Answers | 2 | 11-22-2001 07: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 12:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | 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 |
| Forum Sponsor | ||
|
|
|
|||
|
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 06:41 PM. Reason: get shorther |