![]() |
|
|
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 |
| Formula help | bobo | UNIX for Dummies Questions & Answers | 8 | 03-29-2008 02:53 AM |
| Abacus Formula Compiler 1.0.1 (Default branch) | iBot | Software Releases - RSS News | 0 | 03-09-2008 06:20 AM |
| formula to get the swap space on a machine | melanie_pfefer | SUN Solaris | 1 | 03-03-2008 03:15 PM |
| Shell Script: want to insert values in database when update script runs | ring | Shell Programming and Scripting | 1 | 10-25-2007 04:06 AM |
| Quadratic Formula Program | zeek | UNIX for Advanced & Expert Users | 2 | 02-22-2002 11:32 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help with formula in a script
I need some help. I been doing system admin for the last several years and gotten very rusty on scripting. I need to write a script that will take a log entry and do math using two columns of data to create a new column. I am taking the column(#2) that contains the time and the column(#5) that contains transaction milliseconds and subracting that column for the time column to create a new column in the file. I am butting my head against my screen trying to remember who to do it. Here is an example of my log entry.
20070401 004639826 decode 10578 2770 2.77 00:46:37 29.728125 10.732 17509 So to make it easier to understand if I didn't above(up for about 20 hours working on a project so I might be a little fuzzy, LOL) I want something that does this: 004639826 - 2770 = 004637056 And overwrites the 004637056 to column 8 to have the following output: 20070401 004639826 decode 10578 2770 2.77 004637056 29.728125 10.732 17509 I much appreciate any help that you can provide. Thanks in Advance. Scott Last edited by scottzx7rr; 08-15-2007 at 03:49 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|