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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ignore Duplicate Post iago UNIX for Dummies Questions & Answers 0 09-04-2007 05:29 AM
removing duplicate lines from a file ocelot UNIX for Dummies Questions & Answers 4 01-25-2007 11:02 AM
Ignore case sensitive in Case Switch annelisa Shell Programming and Scripting 1 07-13-2006 04:36 AM
Ignore Case in Shell AAH Shell Programming and Scripting 3 03-21-2006 04:41 PM
How can I ignore only the lines which have # at the begining? csaha Shell Programming and Scripting 1 01-30-2006 03:35 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 Rating: Thread Rating: 3 votes, 4.33 average. Display Modes
  #1 (permalink)  
Old 12-01-2004
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
Great piece of code Ygor !!

Little modification to yr script to handle line numbers in the file.

awk '{FS=":"}{x="";x=tolower($1)+tolower($2);a[x]++;b[x]=$0}END{for(x in a)if(a[x]==1)print b[x]}' file1
  #2 (permalink)  
Old 12-02-2004
hellsd hellsd is offline
Registered User
  
 

Join Date: Nov 2004
Posts: 20
Wow, thnaks you all, I have peformence

question:

I have about 150 files to process every night.
The size of each file can be between 5Mb to 20Mb.

What is more efficient to use?

thanks you all guys, you are great and I like this forum very much.

Thank for your patient.

I am java programmer but sometimes I have some unix stuff to do which is not my cup of tea... But I begin to like it because of you

  #3 (permalink)  
Old 12-02-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,114
The awk solution is a clear winner in the performance department. It is only one process. The other solution has one grep process per line and a handful of other processes.
  #4 (permalink)  
Old 12-02-2004
hellsd hellsd is offline
Registered User
  
 

Join Date: Nov 2004
Posts: 20
Thanks for everyone

I find this very helpful and hope that other people like me can use it on the future.
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 05:04 PM.


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