![]() |
|
|
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 |
| Cut the last field | 435 Gavea | Shell Programming and Scripting | 9 | 03-17-2009 01:04 PM |
| Retrieve 5th Field to Last Field !! | jobbyjoseph | UNIX for Dummies Questions & Answers | 3 | 05-16-2007 04:20 AM |
| ip address octet increments | Naanu | High Level Programming | 8 | 03-26-2007 05:42 PM |
| Moving Part of a field to another field using AWK | rjsha1 | Shell Programming and Scripting | 5 | 08-04-2006 06:39 AM |
| add increment field when first field changes | azekry | Shell Programming and Scripting | 2 | 11-14-2005 04:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Working with field increments
I have a new challenge that I need some help with. Each morning I have two files that contain working units and failed units that I join together to form file3 which is FTP to server for comparison against billing system.
My problem, I would like to take joined data in file3 and add a field that would increase the count by 1 for any unit found to be a failed unit. The count would continue until the failed unit is removed, which could be in excess of 365 days or next day. Both failed and working files change daily. File1 working units change daily but average around 125,000 and file2 failed unit’s average 25,000, totaling 150,000 records in file3. I will use cron to run script daily. Sample file3 output current: 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 123xxx|123xxx|123xxx|123xxx|123xxx|current field| New file3 output: 123xxx|123xxx|123xxx|123xxx|123xxx|current field|failed count days 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 1 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 2 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 34 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 57 123xxx|123xxx|123xxx|123xxx|123xxx|current field| 365 |
|
||||
|
00:00:00:00:00:00|macaddress|10.xx.xx.xxx|31|2|xx00|25|part100001|
00:00:00:00:00:00|macaddress|10.xx.xx.xxx|32|4|x100|14|part100002| 00:00:00:00:00:00|macaddress|10.xx.xx.xxx|37|6|x150|10|part100003| 00:00:00:00:00:00|macaddress|10.xx.xx.xxx|41|5|x200|25|part100004| |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|