File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 8705
    
    6

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCRIPT TO FIND MULTIPLE ENTRIES
 
Similar Threads
Missing column
Populate a JTable
Data Class Locking Test Doublecheck
Populate a JTable
Reading BLOB data in DB2 SQL Stored Procedure