![]() |
|
|
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 |
| Announcing collectl - new performance linux performance monitor | MarkSeger | News, Links, Events and Announcements | 0 | 10-26-2007 07:14 PM |
| increase fs /var | touny | HP-UX | 2 | 02-15-2007 08:57 PM |
| how to increase fs | xuc_xich_duc | SUN Solaris | 6 | 11-28-2006 03:45 AM |
| increase /var on DG-UX box | AnneliseW | Filesystems, Disks and Memory | 0 | 10-10-2005 10:52 AM |
| increase ulimit fo all | sureshy | UNIX for Dummies Questions & Answers | 1 | 05-15-2002 09:02 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Increase Performance: AWK
I have written a code using AWK & sed to compare two files.
The structure of the files is like this" Format is this: <bit code> <file code> <string> Follwoed by any numbers of properties lines whic start with a "space" 10101010101111101 XX abcd a AS sasa BS kkk 1110000101010110 XX abde s BS jsa 0110000101010100 XX acde sa 1010000101010110 XX adfe ma AS asas BS sasa CS asa ............................................. ..................................... Containing millions of records like this Note 1. A new record starts wherever a new line is starting with 1/0 2. Anyline starting with space is properties associated with the last 1/0 record 3. The number of records depicted in above file is 4 I am taking one string at a time (abcd a) and start looking for it in other file, in the string column for 2nd file, until i find that. If that string is found then we compare bit code, file code and properties for that string. (Although both files are sorted yet some records in either of file may be missing so i can't do line by line comparison) The behaviour of program is fine but it's taking a lot of time as it is searching through a big file. So please help me in suggesting how to enhance this file comparison Thanks Sandeep Last edited by sandeep_hi; 06-23-2006 at 12:51 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|