The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-22-2006
sandeep_hi sandeep_hi is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 29
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..
  #2 (permalink)  
Old 07-08-2008
ludwig ludwig is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 8
Try doing this in pearl instead, the speed will increase very mutch.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0