LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How would I ignore other lines in a file with non unique words? (https://www.linuxquestions.org/questions/linux-newbie-8/how-would-i-ignore-other-lines-in-a-file-with-non-unique-words-728155/)

btacuso 05-24-2009 08:12 AM

How would I ignore other lines in a file with non unique words?
 
Hi,

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:newbie:

veerain 05-24-2009 08:20 AM

try using gawk or perl or python.


All times are GMT -5. The time now is 04:15 PM.