Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-24-2009, 09:12 AM   #1
Registered: May 2009
Posts: 32

Rep: Reputation: 15
How would I ignore other lines in a file with non unique words?


How would I ignore lines with similar words and retain only one of those lines. The file has variable fields but, email addresses begin at character 54. I want only any one of the lines with same email address.

field1 field2 field3 field4 field5 emailaddress field7
field1 field2 field3 field4 emailaddress
field1 field2 field3 field4 emailaddress field6


result should be one unique email address.

Thanks again for any help
Old 05-24-2009, 09:20 AM   #2
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
try using gawk or perl or python.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to count occurrences of unique words in a file beeblequix Linux - General 8 06-05-2018 11:16 AM
Make sort ignore comment lines CrendKing Linux - General 3 04-17-2009 11:44 PM
Getting only unique lines using grep.. sph90457 Linux - Newbie 6 07-05-2007 09:31 AM
Removing partially unique lines lluciano Programming 9 01-11-2006 12:20 PM
Unique lines based on specific fields. carl.waldbieser Programming 6 08-21-2005 03:26 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration