aspose file tools*
The moose likes Linux / UNIX and the fly likes SCRIPT TO FIND MULTIPLE ENTRIES Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "SCRIPT TO FIND MULTIPLE ENTRIES" Watch "SCRIPT TO FIND MULTIPLE ENTRIES" New topic
Author

SCRIPT TO FIND MULTIPLE ENTRIES

Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
I tried in oerl but due to extensive search it is taking quite a long time and hence I thought I will give a try with shell scripts.

My data file looks as below with thousands of records. The basic columns are sa below:



My objective is to find the records which has multiple enteries on the 3rd column. For example in the above case,



and

are the candidate record which I am interested.

Hence I need the records whose 3rd column has more than one record as above. Please let me know.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Gopu Akraju wrote:I tried in oerl but due to extensive search it is taking quite a long time


This sounds like a non-trivial operation and with thousands of records, is bound to take a lot of time. I don't think shell scripts are faster than perl, especially for this kind of operation which is not well-suited for scripting. You may gain some speed with Java or C, but probably not much (speculation on my part).
Maybe if you showed us your perl, we could help you tweak it (well, maybe someone else. I'm not a perl guy).


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SCRIPT TO FIND MULTIPLE ENTRIES